473,573 Members | 2,734 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4938
Use the .bodyformat and .mailformat properties.
http://support.microsoft.com/?id=189945

Ray at work

"Phil W" <youngpip@remov ethisbit_hotmai l.com> wrote in message
news:DT******** *************@n ewsfep2-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***@TRASHasp faq.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.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***@TRASHasp faq.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.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******** ******@TK2MSFTN GP11.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***@TRASHasp faq.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.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***@TRASHasp faq.com> wrote in message
news:uN******** ******@TK2MSFTN GP12.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******** ******@TK2MSFTN GP12.phx.gbl...
Oh. fine

he he...

Use Aaron's suggestion.

Ray at work

"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:uN******** ******@TK2MSFTN GP12.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3183
by: Damien | last post by:
Hi to all, After hours of attempts and "googling", I'm still pulling my hair off my head when I try to send multipart html emails. It "works" on PCs with Outlook when I juste send a single "related" mail: one part for the HTML body, and several for the images. However, the images do not show on a Mac. I also wanted to have an...
5
14213
by: lucanos | last post by:
Hey All, I'm having trouble trying to create a PHP file which will generate a multipart email message (containing both an HTML formatted part and a Plain Text formatted part). I have Googled for it, and found previous entries in Google Groups, but I just can't get it to work. My PHP File contains the following:
3
1875
by: Steve | last post by:
I've been told that an e-mail can be constructed using headers so that both a text and HTML version can be sent out simultaneously and the e-mail client will display the type that it can handle (http://www.wilsonweb.com/wmt5/html-email-multi.htm). How is this done using CDONTS and ASP to send an e-mail? Is there a specific field that the...
2
5022
by: Der tolle Emil | last post by:
Hi! I wrote a little function to send emails which works quite well. I already managed to send attachments correctly (also more than 1 per email) but I am not able to send a HTML mail containing a text only block for non-HTML clients. I will not post the PHP code as I think it is irrelevant, the error lies within the mail header and/or...
0
1438
by: ptraj | last post by:
Dear ppls, I'm doing a small project to extract all messages from outlook by Visual Basic 6.0 and write them into a file(in MBOX format). While accessing messages i able to get headers, body, list of attachments. Herer two cases has to be considered. 1. Messages without Attachments. 2. Messages with Attachments. For the first...
10
19525
by: Jed | last post by:
I have a form that needs to handle international characters withing the UTF-8 character set. I have tried all the recommended strategies for getting utf-8 characters from form input to email message and I cannot get it to work. I need to stay with classic asp for this. Here are some things I tried: 'CDONTS Call msg.SetLocaleIDs(65001)
0
2773
by: sachintandon | last post by:
Hello all, Thanks in advance for your help I have a problem in sending emails, my requirement is to send multipart alternative emails with attachments, I'm able to send text with attachments or HTML mails with attachments, but some mail clients are not able to display the html mails that is why I need to send multipart alternative emails, when I...
4
2878
by: ceh | last post by:
Hi, on windows xp I'm using xampp v 1.6.4 I'm trying to send mail. The mail always sends, but the multipart sections are broken. Essentially, I want to send an html email that has a link it, like http://www.google.com so the reader can click on the link. When I get the email, the body is empty.
2
2610
by: Hughesie11 | last post by:
Im trying to post from a form to send an email, im using CDONTS ( I have to as it will be running on NT4), the object appears to get created fine, however the email is not sending, its generates 3 files in the C:\Inetpub\mailroot\Badmail directory they are .BDR, .BDP & .BAD files, here is the text of the .bad: From: postmaster@SERVERMNAME To:...
0
7747
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7669
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7740
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8036
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6361
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3702
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3700
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2167
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1269
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.