469,343 Members | 5,478 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,343 developers. It's quick & easy.

CDONTS multipart/alternative text content

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
Jul 19 '05 #1
9 4778
Use the .bodyformat and .mailformat properties.
http://support.microsoft.com/?id=189945

Ray at work

"Phil W" <youngpip@removethisbit_hotmail.com> wrote in message
news:DT*********************@newsfep2-win.server.ntli.net...
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

Jul 19 '05 #2
> Use the .bodyformat and .mailformat properties.
http://support.microsoft.com/?id=189945


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.
Jul 19 '05 #3
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

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Use the .bodyformat and .mailformat properties.
http://support.microsoft.com/?id=189945


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.

Jul 19 '05 #4
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

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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.


Ideally, you would send both. I am currently writing this in Outlook
Express 6.0, on Windows Server 2003, and if you sent me an HTML e-mail I
would not see the HTML content. Just because HTML is "newer technology"
than plain text hasn't stopped many people from completely disabling HTML
viewing, and this is becoming easier with newer versions of both Outlook

and Outlook Express. Whether or not your end user is using Pine in no way
ensures that they will or won't see a message that is *only* offered in HTML format.

A

Jul 19 '05 #5
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.

"Ray at <%=sLocation%>" <as*@me.forit> wrote in message
news:OM**************@TK2MSFTNGP11.phx.gbl...
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

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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.


Ideally, you would send both. I am currently writing this in Outlook
Express 6.0, on Windows Server 2003, and if you sent me an HTML e-mail I
would not see the HTML content. Just because HTML is "newer technology"
than plain text hasn't stopped many people from completely disabling HTML viewing, and this is becoming easier with newer versions of both Outlook

and
Outlook Express. Whether or not your end user is using Pine in no way
ensures that they will or won't see a message that is *only* offered in

HTML
format.

A

Jul 19 '05 #6
> 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
Jul 19 '05 #7
> 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*...
Jul 19 '05 #8
Oh. fine

he he...

Use Aaron's suggestion.

Ray at work
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uN**************@TK2MSFTNGP12.phx.gbl...
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*...

Jul 19 '05 #9
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

"Ray at <%=sLocation%>" <as*@me.forit> wrote in message
news:uo**************@TK2MSFTNGP12.phx.gbl...
Oh. fine

he he...

Use Aaron's suggestion.

Ray at work

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uN**************@TK2MSFTNGP12.phx.gbl...
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*...

Jul 19 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Damien | last post: by
5 posts views Thread by lucanos | last post: by
2 posts views Thread by Der tolle Emil | last post: by
4 posts views Thread by ceh | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.