Dave, I have a problem which I know that many other users have, certainly of Macs, and maybe of other machines as well: Sometimes when I look at an email which has been sent to me which is clearly *supposed* to be rendered in html in my reader, all I actually see is a bunch of html code gobbledygook.
As you can imagine, the email is completely unreadable.
I have searched and searched for a way to clean this sort of email up so it’s readable, but to no avail. I have been told that the problem is that the email sender does not have some sort of code set correctly, and that some mail programs will overlook this (which I guess explains why they keep sending this garbage, maybe not enough people complain), but that some, such as my Mac’s, will not. Help!
I’ve seen this crop up on occasion too and it’s darn frustrating. From experimentation, it appears that there are two basic ways that an email message indicates that it’s written in HTML format, and both revolve around something called the Multipurpose Internet Mail Extensions, MIME.
In the simplest case, the message is sent purely as HTML and there’s an additional header added to the message that’s Content-type: text/html. Omit that, or have it munged in transit and the nicely designed HTML message ends up being complete gobbledygook, as you see. Some tools at least add a line or two that’s hidden when rendered in HTML but visible otherwise that says something like “You need an HTML capable viewer to read this message. If you’re seeing this, you need to upgrade, or you can go to
The other, more complex, way to send an HTML message is to actually send multiple versions of the message, one that’s just plain text, and one that’s a fully detailed HTML message. This is done through what’s called a “multipart alternative” message and its headers are a bit more complex. Here’s an example:
Content-Type: multipart/alternative; boundary="----=_NextPart_000_001B_01C52196.92F3CF30" X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal This is a multi-part message in MIME format. ------=_NextPart_000_001B_01C52196.92F3CF30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit here's where the plain text part appears ------=_NextPart_000_001B_01C52196.92F3CF30 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable and this is the html part ------=_NextPart_000_001B_01C52196.92F3CF30--
Basically, you’re getting the HTML message, but your mail program just isn’t recognizing it as being formatted in one of these two ways (probably the former, I’m guessing).
The fix? If you can edit the message headers (In Microsoft Entourage, you can only edit the body, for example) then just add in the header Content-type: text/html. If not, you could try saving it as a “.html” file then opening it in Safari, Firefox or your favorite browser.
Either way, that’s a pain and it’d be easier to communicate with the sender to find out why their mail program isn’t creating proper and valid headers.
Simple solution, Roy: you either have a spell checking system that doesn’t know the word “punishment” or you have some sort of macro typing shortcut application installed that is triggering from the word you type. That’s VERY weird, however, I agree. 😉
Apple G4 laptop 17″, OS 10.4.5, Eudora 6.2.3
This really no problem for me, but incredibly strange! When writing a message in the body of a Eudora e-mail, if I type the word “punishment,” it immediately turns red! This occurs only with this word, and I can not change it to black by Edit > Text > Color > No color, or Special > Settings… > Styled Text > Send plain text mail only, or changing fonts, or size, and I didn’t paste any styled text in the e-mail. Isn’t that weird? It’s no problem, because my e-mail recipients receive “punishment” in black. Is this trying to tell me something? Roy Barker
Let me add something to this… I had about 500 messages with munged up HTML in one of my folders. I wanted to keep those messages, and I wanted them to be readable. Here’s what I did:
* Exported them all to a text file (actually an .mbox file).
* Edited the text file with a text editor.
* Did a global replace on Message-ID: to add Content-Type: text/html before the Message-ID:
* Saved the result
* Imported the modified .mbox file into Apple Mail.
* Replaced the munged messages with the “fixed” versions.
You can do a lot with a text editor. 🙂 Thanks for the tip, it was just what I needed to complete the fix.