What happens when I choose to block HTML emails in my email client?
- Does it strip HTML content from my email?
- Does it search for alternative text parts in the MIME content?
I tried Outlook 2010 and stripped the HTML content and just showed the text. I'm not sure if it could not find the text content or approach, then stopped looking for text content and HTML strips.
Below is a snippet of my code,
// html version bodypart html bodypart = new mimeboardpart (); HtmlBodyPart.setContent (html content, "text / html"); // Text Version BodyPart TextBodyPart = New MimeBodyPart (); TextBodyPart.setContent (text content, "text / plain"); Multipart Multipart = New Mime MultiPart ("Optional"); Multipart.addBodyPart (textBodyPart); // Add text part multipart.addBodyPart (htmlBodyPart); // Add HTML part
And surprisingly, Google did not help me on this.
It looks like Outlook does not use text / plain options, and when the plain text forms If it is configured to display the message in, it uses the text / html portion, converting it to plain text.
I got confirmation of the behavior at the following link:
The other (most?) Email client will display, for example Thunderbird, text / plain option, when text will be configured to show the message. But Outlook does not seem to be a bug (using text / html part) - From Wikipedia:
The system can then choose the "best" presentation they are capable of processing; In general, this will be the last part that the system can understand, although other factors can affect it.
Obviously, it is also recommended to keep the same content in both the HTML and TEXT versions, being classified as spam from the same Wikipedia page:
Anti-spam software was finally caught in this trick, punishing messages with very different text in a multilevel / alternative message.
Therefore, I recommend creating a text / plain part with the text of the text / html portion, so that
- display all email client emails As the text displays the email content in the same way
- The possibility of being classified as spam does not increase due to parts of different content < / Ul>
No comments:
Post a Comment