Multipart Alternative Email
An email containing HTML is usually sent by email providers as Multipart/Alternative, by default. This means there will be two versions of your email sent to the recipient:
- One in plain text format
- One in HTML format
The reason for this:
Your recipient may have turned on Plain Text Viewing Only in their email reader. If they have not, then the HTML version will be delivered to them.
This process usually happens behind the scenes, so you may not even know what your email client is doing. We provided an example below to better explain this process.
Example of sender email client setting
In the following screenshot (using Thunderbird as the email client), we are sending a Multipart/Alternative email:
The default format setting is Auto-Detect, but we decided to choose Plain and Rich (HTML) Text. This option will send the message as Multipart/Alternative.
The last two lines are in a red font which will require HTML.
Message Source Details
Two versions of the message were sent out - one in plain text and one in HTML.
Let's take a look at the message source which tells us exactly how it was sent:
Recipient View - when HTML by default
The recipient's email reader was set up to accept HTML, so the HTML version of the email was displayed. Example email below:
Recipient View - when Plain Text only
The recipient has chosen to display messages in Plain Text Only. Example email below:
Notice the last two lines are no longer displayed in red.
"Why would somebody decide to view messages in plain text only?", you may ask.
HTML may contain hidden things like viruses or tracking programs, making it unsafe for your computer. Although many improvements have been made in delivering HTML emails safely, spammers continue to develop new techniques to overcome the safety barriers.
Some recipients (or their employers) choose to receive all emails in Plain Text Only to avoid viruses and tracking programs.