CDO and Multi-part Email?

J

justino

I am trying to send out an email newsletter using both HTML and plain text?
Any good resources for doing this? I can't seem to get it to display the
TextBody when Outlook is set to display emails using Plain Text.

I am using:

Dim objMail
Set objMail = Server.CreateObject("CDO.Message")
objMail.To = "(e-mail address removed)"
objMail.From = "(e-mail address removed) ( Webmaster)"
objMail.Subject = "My Subject"
objMail.BodyPart.ContentMediaType = "multipart/alternative"
objMail.TextBody = "No HTML here. I want this text to display if HTML is
turned off."
objMail.CreateMHTMLBody "http://www.mysite.com/mailer.html"
objMail.Send
Set objMail = Nothing

When I receive the email in outlook with HTML turned off, it comes up a
mess. I was hoping the TextBody would show.
Also, the images I am using have full paths
(http://www.mysite.com/image.jpg) but they are still showing up as
attachments with odd names like ATT21435.jpg.

Thanks for any help,
Justino
 
G

Guest

I'm having a very similar problem:

I'm creating an email using CDO for Exchange 2000. The email has a
"multipart/alternative" body part which contains both a "text/plain" and a
"text/html" body part. When viewing the email in plain text in Outlook,
instead of the showing that body part, it shows the HTML email with the html
tags removed. This is occuring with Blackberries as well.

I'm not sure where to look-
1. My code (I'm using an MSDN example)?
2. IIS, Exchange or other server settings?
3. Exchange/Outlook settings on the client?

Any help would be appreciated.

Thanks,
Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Cdo errors 3
Help with CDO 6
Application-Defined or Object-Defined error 287 7
CDO Script with Database 2
cdo nearly there I think 3
email doesn't get sent 2
request.form 2
Sending a clickable email 2

Top