CDONTS multipart/alternative text content

P

Phil W

I'm using CDONTS and am trying to send an email out which displays in HTML
for HTML-enabled clients, and plain text for non-HTML clients.

Unfortunately I am using IIS4 so CDOSYS is not available (so I can't use the
handy .Textbody or .HTMLBody properties). How would I go about it with
CDONTS?

Thanks,
Phil
 
A

Aaron Bertrand - MVP

Use the .bodyformat and .mailformat properties.

Ray, this article doesn't really tell how to send a plain text alternative
in case the end user doesn't support HTML mail. I get a lot of messages
like this, that only have an HTML portion, so I can't read them... they're
almost always spam of some kind, and go straight to the bit bucket anyway.
 
R

Ray at

No, it doesn't, but he already knows how to send plain text messages. Plain
text vs. html is a business decision, I feel. I don't think many people are
still using PINE or anything. And since these business decisions will first
be made by accounting, who will see there is no additional (noticeable,
anyway) cost in sending HTML vs. plain text, then the marketing department
will get to decide. And you know what they'll pick.

But, ideally, you'd do what he's doing. Let the recipient specify his
preference. Good job Phil.

Ray at work
 
R

Ray at

Yeah, I understand. I'm not as opposed to HTML e-mail as I know you are,
and it is my format of choice for personal e-mail. E-mail lists and all
that, plain text, of course. MS is a bit late by only getting around to the
option of stripping html in OL2003...

And PLEASE add /outnews to your msimn.exe shortcut. I will make fun of you
if you use Outlook Express instead of Outlook Newsreader. Yeah, I know it's
the same thing, but I will make fun of you anyway.

Ray at work
 
P

Phil W

Thanks for the replies guy. Personally I'd just send all emails Plain Text
but the person I am doing this for insists on it being HTML, but with a
Plain text alternative for those who have disabled HTML or use email clients
that don't support it.

I'd got as far as the .Bodyformat and .Mailformat properties, but can't
figure out how to define the text-only portion of the mail.
 
A

Aaron Bertrand - MVP

I'd got as far as the .Bodyformat and .Mailformat properties, but can't
figure out how to define the text-only portion of the mail.

I don't think you can do it with CDONTS. Insist to the person that insists
on HTML e-mail that to support plain text clients he's going to have to
either use a 3rd party component or spring for Windows 2000 so he can use
CDO.Message. There are some samples with a few different components near
the bottom of www.aspfaq.com/2295
 
A

Aaron Bertrand - MVP

I would never choose to send two e-mails.

That's not what I suggested at all. CDO.Message and ASPEmail (and surely
others) have the ability to specify both an HTML portion and a plain text
portion *for the same e-mail*...
 
P

Phil W

In the end I explained the situation to the customer and convinced him to
move to our W2K server. Have now got it set up as a multipart/alternative
mail with CDOSYS and it works really well.

Struggling to find a purely text-only client for Windows for testing though.
Will have to dig in the archives for an old, old copy of Eudora Light!

Cheers guys,
Phil
 

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


Members online

Forum statistics

Threads
474,123
Messages
2,570,730
Members
47,289
Latest member
NicholeC11

Latest Threads

Top