Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 7th, 2003, 02:42 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default 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 ?



 
Old October 8th, 2003, 01:05 AM
Authorized User
 
Join Date: Jul 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

CDONTS has 2 similar properties, MailFormat and BodyFormat. If both are set to zero, like:
Code:
objName.BodyFormat=0
objName.MailFormat=0
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






Similar Threads
Thread Thread Starter Forum Replies Last Post
problems sending mail with java mail gandacuboy J2EE 2 December 20th, 2006 03:05 PM
Sending e-mail to different mail box! Calibus Classic ASP Databases 4 September 3rd, 2004 05:48 PM
Sending a CSS formatted HTML mail madhukp Classic ASP Basics 4 June 17th, 2004 11:30 PM
Attach E-mail in CDONTS jmss66 Classic ASP Basics 8 March 25th, 2004 09:18 PM
CDONTS send mail for Earthlink egerdj Wrox Book Feedback 1 February 17th, 2004 05:50 PM





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