p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Basics (http://p2p.wrox.com/forumdisplay.php?f=61)
-   -   Sending both text mail and HTML mail - CDONTS (http://p2p.wrox.com/showthread.php?t=4635)

madhukp October 7th, 2003 02:42 AM

Sending both text mail and HTML mail - CDONTS
Hello everybody,

I will explain the situation I am in. I need to send a mail to an address using CDONTS. The exact requirement is that it should send both a text version and an HTML version. If client is checking in a mail client that is capable of showing only text mails, it should show the text version. Otherwise it should show HTML version.

I have seen a free component by name Dundas mailer which has provisions for this. This object of this component has 2 properties. 1) body 2) htmlbody. If mail client is capable of showing HTML mails, then it will show htmlbody. Otherwise it will show body. Unfortunately, this component is pretty slow and cannot be used in a production server.

May I know how can I achieve this with the help of CDONTS alone ?

kosla78 October 8th, 2003 01:05 AM

CDONTS has 2 similar properties, MailFormat and BodyFormat. If both are set to zero, like:


the resulting mail is in html format.
In general
BodyFormat=0 (HTML format)
BodyFormat=1 (default Plain Text format)

The MailFormat sets the encoding
MailFormat=0 (Mime format)
MailFormat=1 (default Plain Text format

I hope that these cover your question

Kostas Lagos

All times are GMT -4. The time now is 04:52 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.