Page 1 of 1
[SOLVED] Alternative Body
Posted: Tue Apr 24, 2007 1:48 am
by agidolor
In phpmailer, there is a function to include an alternative body. I use this to include a plain text version of the Body intended for e-mail clients that do not support HTML. I cannot find this function in Swiftmailer; does a similar function exists? I saw an alternative solution by using the multipart feature of Swift, adding an html and text version as parts of the e-mail. I just hope there's a solution similar to phpmailer.
Below is the function in phpmailer:
$mail->Body = "<b>Sample</b>";
$mail->AltBody = "Sample Body";
Posted: Tue Apr 24, 2007 7:03 am
by feyd
Re: Alternative Body
Posted: Tue Apr 24, 2007 8:13 am
by Chris Corbyn
agidolor wrote:In phpmailer, there is a function to include an alternative body. I use this to include a plain text version of the Body intended for e-mail clients that do not support HTML. I cannot find this function in Swiftmailer; does a similar function exists? I saw an alternative solution by using the multipart feature of Swift, adding an html and text version as parts of the e-mail. I just hope there's a solution similar to phpmailer.
Below is the function in phpmailer:
$mail->Body = "<b>Sample</b>";
$mail->AltBody = "Sample Body";
The link posted by feyd does the same thing in a more elegant/flexible manner. You can add as many parts as needed unlike with PHPMailer which only allows two parts.
Re: Alternative Body
Posted: Wed Jun 06, 2007 8:53 pm
by agidolor
Thanks for your help!
