$html = new MimePart($email->getBodyHtml()); $html->type = 'text/html'; ... $text = new MimePart($email->getBodyText()); $text->type = 'text/plain'; ... $mimeParts = array($html, $text); ... $body->setParts($mimeParts);
This works fine, but the email I receive contains both html and text parts - and I mean that both of them are shown.
Gmail first displays the HTML, and then a portion of the plain text is displayed right there. Obviously, I would like to show only the HTML part, and the text part is used only when HTML is not available in the mail client.
Cheers, Andrew
source share