Solved

Adding plain text to a HTML/MIME email

Posted on 2013-06-11
4
330 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 55

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

839 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