For Programmers: Free Programming Magazines  


Home > Archive > ASP > October 2004 > CDO and Multipart Email?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author CDO and Multipart Email?
justino

2004-10-27, 8:55 pm

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 = varEmail
objMail.From = "webmaster@imysite.com ( 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


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com