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";
[SOLVED] Alternative Body
Moderators: Chris Corbyn, General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: Alternative 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.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";
Re: Alternative Body
Thanks for your help! 