Alexandru Stanoi wrote: > Dave Fischetti wrote: >> 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.
> To forward an ezcMail object you can do something like this: > > <code> > // $mail is similar as in the previous example > $mail->addTo( '[EMAIL PROTECTED]' ); > > // then send $mail with MTA or SMTP > </code> I realized later that my example for forwarding was wrong. :) To forward an mail as an attachment you can use the ezcMailMultipartDigest, like this: <code> // $mail is similar as in the previous example $forward = new ezcMail(); $forward->from = new ezcMailAddress( '[EMAIL PROTECTED]' ); $forward->addTo( new ezcMailAddress( '[EMAIL PROTECTED]' ) ); $forward->subject = "Fw: " . $mail->subject; $forward->body = new ezcMailMultipartDigest( $mail ); // then send $forward with MTA or SMTP </code> Cheers, Alex. -- Alexandru Stanoi eZ Components System Developer eZ Systems | http://ez.no -- Components mailing list [email protected] http://lists.ez.no/mailman/listinfo/components
