I'm testing some mail sending software that I've written and I'm sending emails in text/plain format with an alternative format of text/HTML.

How do I toggle between the text/plain and text/HTML views in a web based mail client?

I'm using Yahoo, Hotmail, and Gmail for my testing so the method to toggle the views in any one of those clients will work for me.

(At the moment all the clients show me the email in text/HTML format but I want to verify that the text/plain format is good, but can't see it.)

  • That's a really good question. I would think it would depend on what format the message is sent is. That said, I know mail clients can do what you're describing, so I can't see why a web mail client can't. – Eli Gundry Nov 22 '10 at 18:21

In Gmail, I think your only option is to click the arrow on the top right of the message, and then choose "Show Original".

The message is most likely to be sent in MIME format, so you can scroll down past the headers and look for something like this: Content-Type: text/plain. In MIME format, there are unique strings (boundaries) between each message part, I believe that each email client chooses its own string to use. You can find out what is being used if you locate the following header:

Content-Type: multipart/alternative;

In this case, the string -----------=Sample_Msg_Part156165161321654 is used to delimit the different message parts.

Here's an example...

Let's say that the message has the following content:

From: user@example.com
To: user@example.com
Subject: Test
MIME-Version: 1.0
Content-Type: multipart/alternative;

Content-Type: text/plain

This is a sample message. This is the text portion of 
the message.
Content-Type: text/html

This is a sample message. This is the <b>html</b> portion
of the message.

... the plain text would look like this:

This is a sample message. This is the text portion of the message.

... while the HTML would look like this:

This is a sample message. This is the html portion of the message.

| improve this answer | |

Google now has a 'Message Text Garbled?' item on this 'More' nav. Click it to see the plain text version.

'More' message menu

header displayed above plain-text version

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.