Seth, comments would be great!!!
John Woods
Managing Consultant
Buchanan Associates
http://www.buchanan.com
A Technology Company in the People Business.
-----Original Message-----
From: Seth Bienek [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 9:36 AM
To: [EMAIL PROTECTED]
Subject: RE: <CFMAIL - HTML or Plain Text
> Anyone know how in Cold Fusion to determine when sending out an e-mail via
> <cfmail> if the email client can't display HTML so those users don't get a
> bunch of HTML they can't understand?
Hi Brett,
CFMAIL only supports either plaintext OR HTML emails, as far as I know.
You CAN, however, BUILD an email that is compatible with both types of
mailreaders, by building a multi-part email. The code below should give you
the idea:
<cfset boundary = CreateUUID()>
<cfmail to="[EMAIL PROTECTED]" from="[EMAIL PROTECTED]" subject="test">
<cfmailparam name="Content-Type" value="multipart/alternative;
boundary=""#boundary#""">
--#boundary#
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
This is the plain text message for the email.
--#boundary#
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<title>HTML Message</title>
</head>
<body>
This is the HTML text message for the email.
</body>
</html>
--#boundary#--
</cfmail>
Keep in mind, though, that AOL mailreaders do not follow MIME standards, so
they may/may not render this type of message correctly. 5.0, at least, will
show both parts of the message.
If anyone would like me to comment the above code to explain exactly what
it's doing, I'd be happy to, just let me know.
Hope this gets you headed in the right direction, Brett.
Best Regards,
Seth
------------------------------
Seth Bienek
Solutions Development Manager
Stonebridge Technologies, Inc.
972.455.7294 tel
972.404.9754 fax
ICQ #7673959
------------------------------
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org