Solved

Adding plain text to a HTML/MIME email

Posted on 2013-06-11
4
329 Views
Last Modified: 2013-07-01
Hi - I have created a HTML email which I will be sending out via CDO and converted to a MIME format.  However, I am looking at spam scores and it is suggesting that I also add a text only version.

Can someone give me a pointer as I'm a little stuck (here is a stripped down version of the html).

Thank you (as always).


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Information</title>
<style type="text/css">
body, td, th {
	font-family: Verdana, Arial;
	font-size: 10pt;
	color: #000000;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.FooterText {
	font-size: 7.5pt;
}
</style>
</head>

<body>
<p>Here is the html content<span class="FooterText"><br />
  </span></p>
</body>
</html>

Open in new window

0
Comment
Question by:Andy Brown
  • 2
4 Comments
 
LVL 54

Expert Comment

by:Julian Hansen
ID: 39237007
As far as I can remember CDO has both a TextBody and an HTMLBody property you can set.
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 39237193
I think this http://www.enewsletterpro.com/articles/multi_part_mime_messages.asp is the most direct explanation of what you are supposed to.  There are several other 'types' that a MIME section can be and one of the most common is 'base64 encoded' which is used for attachments and embedded images.

Like @julianH referred to, CDO and other methods or programs like PHPMailer can automate a lot of this for you.

And desktop mail clients generally do not understand XHTML and web mail clients strip that part so that it does not affect their web page that your email appears in.  HTML4 is pretty much where HTML in email has stopped.
0
 

Author Closing Comment

by:Andy Brown
ID: 39290889
Thanks Dave that was really useful - sorry for taking so long to award the points.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39290913
You're welcome, thanks for the points.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question