plain text messages using PHPmailer
Posted on 2009-12-18
I use PHPmailer to send out mail messages. Have an HTML message, and want to produce a text equivalent like so:
$html = "<p>some content</p>"
$mail->Body = $html;
$text = "some content\n\n";
$mail->AltBody = $text;
i usually set $mail->IsHTML(true)
The HTML message is fine if I set up Outlook to accept HTML emails. I then changed my settings in Outlook to read all mail in plain text.
The problem is that when the message is sent Outlook is reading the HTML message not the text equivalent...I thought that setting $mail->AltBody = $text would mean that Outlook would read the right message....
Am I doing something wrong? How can I ensure that Outlook reads the correct message?