Why doesn't Outlook use the text / regular part?

First of all, hi

With SwiftMailer, I send HTML + PLAIN emails.

In Outlook, when displaying this email as plain text, this is not my simple text part, but an automated parsed version of HTML.

Does anyone know how to get Outlook to use the text / open part of a message when displaying plain text?

My code does the following:

$plain_body = convert_html_to_text($body); $message->setBody($body, 'text/html') ->addPart($plain_body, 'text/plain'); 

$body has some formats and images:

 vardump($body); <html> <head>...</head> <body> <img src="logo.png" alt="Company name" /><br /> <img src="border.png" alt="border" /><br /> <img src="face.png" alt="Mr Somebody" /><br /> <p>Hello Ninj! You requested a confirmation by email...</p> <img src="footer.png" alt="footer" /> </body></html> 

$plain_body contains very clean text (thanks to javon):

 vardump($plain_body); "Hello Ninj! You requested a confirmation by email..." 

But in the text version viewed in Outlook, I see instead all the alt pics attributes of the HTML version, one line at a time, then slightly slightly formatted text:

The name of the company

Border

Mr Somebody

Hi Ninh!

You have requested confirmation by email ...

footer

Thank you for helping anyone who can help :)

+3
outlook plaintext
Oct 02 '13 at
source share
1 answer

I can’t do it. Outlook keeps all 3 body flavors (HTML, RTF, plain text) in sync. This is done at the provider level.

When it receives a MIME message, it uses the HTML body (if available). When the message is saved, the storage provider uses the HTML body to create the body of the plain text (PR_BODY property).

+4
Oct 02 '13 at
source share



All Articles