Hey Alex. I'm starting to get the hang of this now. Thanks again for
the help. I have 2 quick questions.
If I want to delete the mail after I parse it, do I just use the
$mail->messageId as a paramater of the delete() function?
Also, if I wanted to redirect a complete message to a different
address, would I just compose a new message and rebuild the parts
with the forwarded content? or is there a simpler way of doing it.
Thanks a lot.
Dave
On Jul 24, 2007, at 12:30 PM, Alexandru Stanoi wrote:
> Dave Fischetti wrote:
>> WOW alex. I KNEW their had to be a different and MUCH BETTER way
>> to do this.
>> Now if I wanted to move the file from the /tmp folder to say an
>> images directory or even into the database itself, Can I do that
>> within the loop. or does it have to happen sooner before its parsed?
>
> It should happen before the script ends, because the /tmp files
> created by the parser are deleted then. So in the loop is the
> perfect place:
>
> <code>
> // ...
> if ( get_class( $part ) === 'ezcMailFile' )
> {
> echo "Attachment: " . $part->fileName;
> copy( $part->fileName, '/home/images/' . basename( $part-
> >fileName ) ); // or to database
> }
> </code>
>
> --
> Alexandru Stanoi
> eZ Components System Developer
> eZ Systems | http://ez.no
--
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components