About the
Email Standards Project

The Email Standards Project works with email client developers and the design community to improve web standards support and accessibility in email. Read more »

Blog Archives

Blog Categories

RSS Feed

ESP Blog Feed

Recent Entries

Hotmail Converts HTML to ASCII

Posted by Mark Wyner on January 16, 2008 in Email Client News

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]
Firefox 2 and Netscape 9

[screenshot: Opera]
Opera 9

[screenshot: Safari/IE]
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.

103 Comments so far

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

Posted 10:40 pm on 21 January 2008 - #1

Comment above me: What the…

On topic:
Great, that explains alot. Thanks, Mark. Keep up the good work.

Christiaan “Calen”

Posted 7:56 pm on 23 January 2008 - #2
PJ said...

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.

Posted 2:20 am on 24 January 2008 - #3
chimeze nnachi said...

i will do any business with ur company

Posted 10:56 pm on 25 January 2008 - #4
Christiaan Gieles said...

chimeze nnachi - this page is not a company.

Posted 12:51 am on 26 January 2008 - #5
James said...

@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

Posted 3:30 am on 26 January 2008 - #6
Robert said...

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!!

Posted 1:30 am on 29 January 2008 - #7
James said...

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/ )

Posted 3:39 am on 29 January 2008 - #8
PJ said...

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.

Posted 7:57 am on 29 January 2008 - #9
James said...

Have you guys applied for membership in the Email Roundtable? 
http://tech.groups.yahoo.com/group/emailroundtable/

Posted 8:19 am on 29 January 2008 - #10
John said...

options is not on my toolbar, how do I get it back?

Posted 11:50 am on 29 January 2008 - #11
Mark Wyner said...

@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.

Posted 1:56 am on 30 January 2008 - #12
PJ said...

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.

Posted 7:03 am on 30 January 2008 - #13
James said...

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.)

Posted 8:23 am on 30 January 2008 - #14
Mark Wyner said...

@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.

Posted 8:48 am on 30 January 2008 - #15
PJ said...

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.

Posted 9:19 am on 01 February 2008 - #16
Rudy said...

So stop sending HTML emails. Problem solved! Text-only IS the standard, why pretend otherwise?

Posted 9:12 am on 02 February 2008 - #17
James said...

Classic!  Thanks, I needed a laugh.

Posted 5:09 am on 05 February 2008 - #18
CHIGOZIE said...

HI R U READY FOR GIRLS TRAFFIC COOL GIRLS ON LINE FROM 18 AN 20 OK

Posted 1:28 am on 06 February 2008 - #19
PR said...

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.

Posted 11:07 pm on 07 February 2008 - #20
Mark Wyner said...

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.

Posted 4:02 am on 08 February 2008 - #21
Michiel Buddingh' said...

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…

Posted 6:49 pm on 12 February 2008 - #22
submedical said...

yes.classis.thx

Posted 9:00 am on 28 March 2008 - #23
guatr said...

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

Posted 8:12 am on 02 April 2008 - #24
self storage said...

Some great information. So nothing can be done in HTML itself to prevent the issue?

Posted 7:43 am on 07 May 2008 - #25
car finance said...

Very interesting info… thanks for posting!

Posted 12:32 am on 17 May 2008 - #26
SEO UAE said...

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.

Posted 9:39 am on 27 May 2008 - #27
Plastkort said...

Interesting flaw.  So what is Hotmail doing differently than Yahoo & GMail?

Posted 10:22 am on 05 June 2008 - #28
Au Pair said...

Very helpfull info, thanks

Posted 9:05 pm on 05 June 2008 - #29
torbalı said...

http://www.torbaliweb.com sizlere teşekkür eder

Posted 10:41 pm on 12 July 2008 - #30

good nice

Posted 12:43 pm on 20 July 2008 - #31
Oyun said...

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.

Posted 4:02 am on 21 July 2008 - #32
oyun indir said...

nice text

Posted 3:04 am on 23 July 2008 - #33
Cheap viagra said...

http://forums.megagames.com/forums/member.php?u=203946 cheap soma <a href=” http://forums.megagames.com/forums/member.php?u=203948 cheap zoloft

Posted 4:27 am on 23 July 2008 - #34

James thats exactly what I was looking for. I had actually fixed the problem with a line-height http://bl.574zf.com value before but then it broke again when they changed something else. Hopefully this fix lasts longer =)

Louis Vuitton Handbags

Posted 12:11 pm on 04 August 2008 - #35
Oyunlar said...

Use gmail or post emails in text not html.
Gmail is my favourite.
In turkey generally hotmail for only msn anda gmail is for mailing.

Posted 12:41 am on 17 August 2008 - #36

Who uses Hotmail anyway. Oh, I do actually. But only for spam and mailinglists. I am more then happy with the good ‘ol Squirrelmail ;-)

Posted 8:14 am on 14 October 2008 - #37

Insaat Makineleri Kategorisindeki Firmalar, Firma Ekle | iskele kalıp dünyası

Posted 8:12 am on 15 October 2008 - #38

Thanks… Ahşap Çocuk Oyun Grupları Kategorisindeki Firmalar, park bahçe dünyası…

Posted 8:15 am on 15 October 2008 - #39
ara said...

good article thanks. ara iskele kalip dunyasi…

Posted 8:24 am on 21 October 2008 - #40

Thanks for all of the updates on Hotmail. This helps quite a bit with my email design company

Posted 7:27 am on 24 October 2008 - #41
wow ogld said...

532344
wow gold

Posted 7:32 pm on 06 November 2008 - #42
WOW GOLF said...

903844
wow gold

Posted 7:32 pm on 06 November 2008 - #43
wow ogld said...

0987655
wow powerleveling

Posted 7:33 pm on 06 November 2008 - #44
battery said...

thanks for it

Posted 8:49 pm on 10 November 2008 - #45
inşaat said...

Thanks a lot..
inşaat inşaat

Posted 8:18 am on 17 November 2008 - #46
Oyun indir said...

This demonstrates the degree in which Microsoft Hotmail is broken.

Posted 4:33 am on 18 November 2008 - #47

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.

Posted 4:49 am on 18 November 2008 - #48
wow gold said...

mmomore Thanks to everyone who emailed us about Mobile Me, including Georg Stadler and Stefan Kremer who both sent in screengrabs.

Posted 12:56 am on 20 November 2008 - #49
Site Ekle said...

text emails in plain text is the one and only standard for email messages.

Posted 5:54 am on 20 November 2008 - #50
web hosting said...

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.
regards,
web hosting

Posted 6:21 am on 27 November 2008 - #51
Essay said...

thanks for sharing nice article dude..
thanks a lot.
regards,
Essay

Posted 1:17 am on 29 November 2008 - #52

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.
regards,
Reverse Phone

Posted 11:21 pm on 01 December 2008 - #53

Great research sir, you are genius
Thanks for sharing
SinglesDigest

Posted 7:57 am on 02 December 2008 - #54
SSNLocator said...

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.
thanks..
regards,
SSNLocator

Posted 5:16 pm on 03 December 2008 - #55

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…

Posted 8:42 am on 05 December 2008 - #56
Teknoloji said...

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.

Posted 8:43 am on 05 December 2008 - #57

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.

Posted 6:27 pm on 08 December 2008 - #58
Melis Birkan said...

I like it!
Hilary Duff

Posted 1:54 am on 18 December 2008 - #59

I like it!

Posted 5:18 am on 19 December 2008 - #60
hm clothing said...

i agree!

Posted 11:31 am on 03 January 2009 - #61

Thank you, it is very good and i like it very much buy Asda Story Gold

Posted 12:40 pm on 06 January 2009 - #62
buy diggs said...

digg

Posted 9:54 am on 08 January 2009 - #63

VeryPDF HTML Converter is a powerful HTML conversion product. It allows you to create previews or thumbnails of web pages in a number of different formats, such as TIF, TIFF, JPG, JPEG, GIF, PNG, BMP, PCX, TGA, JP2 (JPEG2000), PNM, etc. It also allows you to convert web pages to PDF, PS (postscript), WMF, EMF vector formats. VeryPDF HTML Converter doesn’t depend on print drivers it renders web pages quickly and accurately.

Mobil X Mobiltelefoner

Posted 5:14 pm on 11 January 2009 - #64

something interesting for anyone!

Posted 5:30 pm on 14 January 2009 - #65
Malta Hotels said...

A couple of weeks ago, a company posted an advert here for a shareware ($10)
html to ascii converter.

I mentioned that I had written one back in 1994 and if anyone wanted the
source or DOS .exe they could have it for free. The response was quite
amazing, so I’ve put in on our ftp server. Feel free to use the .exe or
source for whatever (legal!) purpose you choose, without charge.

The files can be found at:-

ftp://ftp.u-net.com/com/scanline/html2txt/html2txt.zip

Regards

Posted 6:24 am on 19 January 2009 - #66
arda turan said...

good luckss

Posted 8:21 am on 19 January 2009 - #67

The beautiful story, we can not be forgotten, buy flyff penya .

Posted 1:04 pm on 22 January 2009 - #68

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.

Posted 5:35 am on 26 January 2009 - #69

This is a very interesting article, especially for Hotmail customers.
Thank the author of the article.

Posted 5:53 am on 29 January 2009 - #70

CharProbe allows you to easily find and automatically copy: ASCII Codes, HTML Codes, Virtual Key Codes. You can also export custom tables to TXT or HTML. Includes tool used to convert between decimal, hexadecimal, octal and binary numbers. You can get ASCII code of any character and virtual key code of any key you press. It’s possible to copy Virtual Key Code constant declaration ready to use in various programming languages.

Posted 5:07 am on 03 February 2009 - #71
Sohbet said...

Orbit goes into full production. Keep that data coming because we’re thirsty and we won’t disappoint you.
Sohbet
Thank^’s its good

Posted 9:00 am on 05 February 2009 - #72

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.

Precision Auto Services, Morris NJ
Experienced, certified mechanics for fine European cars and their owners.

Posted 5:55 am on 06 February 2009 - #73

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.

Posted 6:21 pm on 07 February 2009 - #74
First said...

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

Posted 1:05 am on 10 February 2009 - #75

HTML is far better to implement and change codes.. ASCII is much more difficult , however its a preventive measure to be safer from hackers.

Posted 5:49 am on 11 February 2009 - #76

The Email Standards Project. We all know that email clients aren’t consistent in their support ... In last month’s Interview with Judy Brewer on WCAG 2.0, ...

Posted 5:41 am on 18 February 2009 - #77
singles said...

Many E-mail and Usenet News reader programs, usually the mail and news reader programs that come with browser packages, allow users to include binary attachments (MIME or other encoding) or HTML (normally found on web pages) within their E-mail messages. This makes URLs into clickable links and it means that graphic images, formatting, and even color coded text can also be included in E-mail messages

Posted 9:48 pm on 19 February 2009 - #78

CharProbe allows you to easily find and automatically copy: ASCII Codes, HTML ... web based email such as Outlook, Thunderbird, Eudora, Gmail, Hotmail, and Yahoo! ... Convert html color codes to a color or a color to an html color code ...

Posted 5:09 am on 20 February 2009 - #79
wow gold said...

It’s very good!!
haha

Posted 1:25 pm on 20 February 2009 - #80

ASCII is much more difficult ?

Posted 5:57 pm on 20 February 2009 - #81

How to convert?

Gucci Replica handbags|
replica chanel handbags

Posted 1:27 am on 24 February 2009 - #82
netflow said...

Pad is the world’s first powerful text and HTML editor to include both an image viewer and a word processing function. The new text editor provides syntax highlighting, unlimited undo, a powerful search and replace engine with regular expressions, a block (column) selection mode, line bookmarks and line numbers. In addition to the usual text modification features, you can use all the standard features you would expect from a text editor.

Posted 1:48 am on 26 February 2009 - #83
jackey said...

Are you OK? wholesale jewelry | fashion jewelry baby?

Posted 6:10 pm on 28 February 2009 - #84

AsCi rocks!!

We are a young Dutch company aiming at office enviroments to advise and prevent RSI - CANS - Muisarm. Bureaustoelen & Kantoormeubelen http://www.Health2Work.nl

Posted 8:27 pm on 02 March 2009 - #85

Includes tool used to convert between decimal, hexadecimal, octal and binary numbers. You can get ASCII code of any character and virtual key code of any key you press. It’s possible to copy Virtual Key Code constant declaration ready

Posted 1:37 am on 04 March 2009 - #86
Teak Tables said...

Well done by hotmail and this is a big step towards email success i believe.

Posted 7:01 am on 06 March 2009 - #87
Curt said...

Windows Mail to HTML Converter is ideal as a back up solution for your mail when you need to re-install the Operating System, the mail client itself or want to safeguard your correspondence against hardware crashes and software errors that can make the clients content inaccessible. It is a small utility allowing you to export Windows Mail content, messages and attachments, into structured HTML archive files that can be viewed in any web browser.

Posted 11:02 pm on 10 March 2009 - #88

You must have a good way to manage yourGuild Wars Gold.

Posted 7:35 pm on 11 March 2009 - #89

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 ...

Posted 3:29 am on 13 March 2009 - #90

this site is excellent,i like it,thank u for all.
wholesale jewelry

Posted 1:32 pm on 20 March 2009 - #91
الخفوق said...

Do yo have that Size? i Do not see Be For That

Posted 4:45 am on 23 March 2009 - #92
Peter John said...

this is such great information. thanks for the insight.,,

delonghi pinguino

Posted 6:44 am on 26 March 2009 - #93
ISO 9001 said...

very nice, blog. I am web page http://www.eld.com.tr

Posted 7:13 pm on 31 March 2009 - #94

This issue is something which we can neither prepare for or remedy with special markup techniques.
kind regards
[url="http://www.thedocumentshredding.info"
]free document shredding san francisco[/url]

Posted 9:52 pm on 31 March 2009 - #95

If you’re a Windows Mobile user and linked into Hotmail or other Windows Live services, Microsoft has released an updated Windows Live app that’s going to make your mobile life a bit more streamlined.

Posted 4:17 am on 03 April 2009 - #96
Replica bags said...

it would _not_ send out the text/plain part; obviously it’s not meant to be actually read by anyone. I known the Replica bags

Posted 12:37 am on 13 April 2009 - #97

his issue is something which we can neither prepare for or remedy with special markup techniques.

Posted 12:38 am on 13 April 2009 - #98

I think that you know what you are writing about so i will give it a try!

Posted 8:08 am on 13 April 2009 - #99
WOW gold said...

When the Wow Gold wolf finally bnb

Posted 12:20 am on 14 April 2009 - #100

wholesale jewelry cheap jewelry,handmade jewelry

Posted 1:31 pm on 15 April 2009 - #101

jewelry wholesale,wholesale costume jewelry,wholesale fashion jewelry,costume jewelry

Posted 1:32 pm on 15 April 2009 - #102
Ugsername said...

I thank to this article’s author. I have seen a video about that in youtube and facebook. Thanks to contributor.

Regards......

Posted 7:52 am on 20 April 2009 - #103
Commenting is not available in this weblog entry.