Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

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

share|improve this question

migrated from superuser.com Nov 22 '10 at 17:30

This question came from our site for computer enthusiasts and power users.

    
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

2 Answers 2

up vote 4 down vote accepted

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;
        boundary="-----------=Sample_Msg_Part156165161321654"

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;
        boundary="-----------=Sample_Msg_Part156165161321654"

-----------=Sample_Msg_Part156165161321654
Content-Type: text/plain

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

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

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

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

share|improve this answer
1  
Can you add a screenshot? –  Jacob Jan Tuinstra May 7 '13 at 9:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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