Hotmail Converts HTML to ASCII
Some recent tests have lead to a discovery about how Windows Live Hotmail (Hotmail) processes and delivers HTML in emails. Following are the results of my exploration, covering the conversion, delivery and rendering process using our own acid test.
Because webmail isn’t a self-contained application, and can be accessed via most common web browsers, this post discusses cross-browser performance rather than cross-client performance. Specifically because browser performance is the variable in the findings.
The Conversion: HTML-to-ASCII
The first thing Hotmail does is convert all non-number/letter characters in the HTML to hex-formatted ASCII characters. So:
<h1>H1 headline (34px/1em)</h1>
Becomes:
\x3ch1\x3eH1 headline \x2834px\x2f1em\x29\x3c\x2fh1\x3e
And the source code is printed exactly the same (byte-for-byte) irrespective of the browser.
This has an impact on how emails render—not in every browser, just Safari and Microsoft’s own Internet Explorer. Regarding the latter, my guess is that this has something to do with an IE security vulnerability identified in the CVE dictionary, but of course I can’t say for sure. Why Safari doesn’t render the ASCII characters is also a mystery.
The Delivery: JavaScript innerHTML Function
Most popular webmail clients rely heavily on Javascript to print messages into HTML-based GUIs, and Hotmail is no exception. After Hotmail converts the HTML to ASCII characters, it prints the converted markup using the Javascript innerHTML function:
<script>document.getElementById("MsgContainer").innerHTML='[markup here]';</script>
And there is no alternative because scripting must be enabled to even log in to Hotmail.
The Rendering
While the markup prints the same across the board, IE and Safari renders the markup differently. Following are screen shots from Firefox/Netscape (same screenshot), Opera and Safari/IE (same screenshot):
![[screenshot: Firefox/Netscape]](http://www.email-standards.org/images/uploads/FirefoxNetscape.gif)
Firefox 2 and Netscape 9
![[screenshot: Opera]](http://www.email-standards.org/images/uploads/Opera.gif)
Opera 9
![[screenshot: Safari/IE]](http://www.email-standards.org/images/uploads/SafariIE.gif)
Safari 3 and IE 7
Notice how while Safari/IE do render the HTML in ASCII they do not render the CSS in ASCII. Yet if you view the converted message source you can clearly see that both the HTML and CSS have both been converted the same way. This is what I find especially perplexing.
I had considered that the meta character encoding or DOCTYPE may be different from one browser to the next, but as it turns out Hotmail delivers the same DOCTYPE and encoding across the board. There are some variables with browser-specific classes on the body and even a unique Javascript for Firefox; however, as far as I can tell they simply impact Hotmail design/functionality.
Conclusion
My research concludes that this issue is something which we can neither prepare for or remedy with special markup techniques. If you happen to be someone who understands how to force IE or Safari to render ASCII text, please feel free to share your comments below. In the interim, awareness is the key.
i want ur company to me to start importation of any thing that the have, i dont money for now if the can sporson me am ok thanks and remain bless in jesus name amen
Comment above me: What the…
On topic:
Great, that explains alot. Thanks, Mark. Keep up the good work.
Christiaan “Calen”
I noticed they seem to do some sort of “safeHTML” process a while back and tried multiple ways to get image-based html emails to go through properly. Currently I notice large spacing between images when setting tables of cut slices.
Styles are pretty much worthless when it comes to any microsoft product, be it IE or their email clients. I’ve yet to see any other major email marketing campaigns send through an email that properly displays with firefox in hotmail-live.
i will do any business with ur company
chimeze nnachi - this page is not a company.
@PJ - I vaguely complained about a Firefox/Hotmail problem on Email Roundtable… I was having a tables/slicing issue with Firefox and Hotmail/Live Mail—but the problem didn’t exist in IE and Hotmail/Live Mail.
Someone immediately knew what I was talking about and emailed me off-list with the solution—adding the following two lines to my style tag at the top.
img {display: block;}
.ai {display:inline;}
That immediately fixes all slices. Then for any inline images, you add:
class="ai" style="display:inline;"
to the img tag.
That cleared the problem right up for me.
James
James, thank you very much!! It works like a charm and this has been bothering me for an awefull long time!! Thank you very very much!!
Gotta give the credit to Aaron Smith of Smith-Harmon. (Check out the RSS feed of their blog… they regularly look into what works and doesn’t work in the messaging side of email. Quite a good read… http://www.smith-harmon.com/ )
James thats exactly what I was looking for. I had actually fixed the problem with a line-height value before but then it broke again when they changed something else. Hopefully this fix lasts longer =)
I really wish this website was more active or at least supported community discussions more.
Have you guys applied for membership in the Email Roundtable?
http://tech.groups.yahoo.com/group/emailroundtable/
options is not on my toolbar, how do I get it back?
@PJ and James:
The reason we are not commenting about your tables issues is that tables are not a part of ESP’s mission. We are promoting web standards in HTML emails, so we’re not studying how tables perform in email clients across the board.
A great place to discuss this topic would be the Campaign Monitor forums:
http://www.campaignmonitor.com/forums/
I can even see threads on this very topic therein.
I hope that helps.
I wasn’t complaining about my table issues, I was complaining about the lack of any discussion at all on here. The table issues really isn’t the problem, it’s the lack of support for the CSS on the images which is the issue causing me to resort to tables. If you can get a slice image based email into the major 5 email clients without resorting to a table, that would make a worthy post. However since they don’t follow standards (the reason for this site) some of us have to do some hacks to get our campaigns to work properly.
That’s my take, too. The standards right now call for tables.
If you’re telling us to go away because we’re not talking about the desired standards, ok. (Though there might be some merit should someone from Hotmail come along and see the lengths we’re having to go through to get email to look good in their browser and maybe compel them to do more towards hitting the desired standards.)
But I checked out the Campaign Monitor forums and there seems to be way too much “How do I do x with y ESP?” to be useful.
I’ve suggested that Email-Standards.org ought to have a section for how to work around the failures of the browsers and was told it distracted from the desire to get ISPs/software companies to get on board with the standards. (I’d suggest a forum area would be a low-cost way for people who arrive here to learn from their peers what to do and would raise the profile of Email-Standards.org and its cause.)
@PJ and James:
My apologies if my comment was misconstrued. I was neither suggesting that your comments aren’t welcome or that your techniques are invalid. Rather, I was simply responding to your wanting more discussion about solutions requiring non-standards techniques such as tables.
Those are valid conversations given the current lack of support for standards in common email clients. However, the ESP mission is to discuss implementation and acceptance of standards-based emails.
We absolutely welcome interim solutions you might have and invite others to respond. But you will find that participation from ESP in such discussions on this website will be few and far between because it is not our focus. I simply pointed you to the Campaign Monitor forum not to send you away, but rather to offer an arena where you might find more conversations about the topics you’re not seeing here. And you’ll even see some of us on those forums discussing said topics/techniques.
I hope that helps clarify my original comment. We appreciate your participation on any level and welcome your voice in our discussion.
Again Mark your missing the point to what I am saying about the lack of discussion on this site. It’s not a lack of discussion on a particular topic, but the lack of ANY discussion at all.
As James mentioned, that forum is worthless to any real discussion as it’s just a bunch of people asking how to use the campaign monitor service. There’s no real in depth discussion on some of the heavier topics such as the one we are currently discussing with Hotmails crappy rendering system. Which brings us back to the whole standards problem since no one is using any standard system we are forced to develop hacks that work flawlessly across multiple email systems.
So stop sending HTML emails. Problem solved! Text-only IS the standard, why pretend otherwise?
Classic! Thanks, I needed a laugh.
HI R U READY FOR GIRLS TRAFFIC COOL GIRLS ON LINE FROM 18 AN 20 OK
well, a lot of security issues have forced major online services provider (like hotmail) to change text markup. My guess is that they preferred this issue, over the security issues which are very sensitive to news and bad PR.
Thanks for your meaningful contribution, PR.
You make a good point, which supports our perspective on all of this. We aren’t here to point fingers and chastise the email-client developers. They have lots of challenges before them; your point being one.
Still, there are companies who successfully blend support for standards-based HTML with proper security, and we wish to share their success as a model.
What bothers me more is that Hotmail renders the text/plain part of outgoing messages in precisely the same manner.
Something like:
<DIV>From: </DIV>
<DIV>Hello,
This demonstrates the degree in which Microsoft Hotmail is broken.
At least for people who like their mail without markup.
</DIV>
Is ‘rendered’ by software that has no notion that those divs have an attached style that puts them on separate lines, yielding something like this:
From: ,this demonstrates the degree to which Microsoft Hotmail is broken.At least for people who like their mail without markup.
I’m not kidding. Even simple stuff like converting
s to newlines isn’t done.
And because the message is sent as multipart/alternative, people whose clients are set to display text/plain mail will always receive this broken rendition of mail sent from Hotmail, even when their clients are capable of displaying HTML. So it doesn’t just affect us techno-luddites.
If Hotmail were more honest, it would _not_ send out the text/plain part; obviously it’s not meant to be actually read by anyone. But HTML-only mail happens to trigger a large number of spam filters…
yes.classis.thx
As James mentioned, that forum is worthless to any real discussion as it’s just a bunch of people asking how to use the campaign monitor service. T
Some great information. So nothing can be done in HTML itself to prevent the issue?
Very interesting info… thanks for posting!
Well, to be honest while talking about the email standards… then Rudy have a point inhere :) text emails in plain text is the one and only standard for email messages.
Interesting flaw. So what is Hotmail doing differently than Yahoo & GMail?
Very helpfull info, thanks