This code will send a multipart message which will display as html where 
supported and text where it is not supported. It works in Eudora, AOL, 
Netscape mail, Outlook.....


<cfparam name="name" default="">
<cfparam name="htmlbody" default="">
<cfparam name="textbody" default="">
<cfparam name="recipient" default="">
<cfparam name="subject" default="">
<cfparam name="from" default="">

<!--- set the html message--->
<cfset htmlbody="Put html message here. Try the cf_bodycontent tag, works 
well for this purpose....">


<!--- now set the text only message --->
<cfset textbody="test only message">

<cfset crlf = chr(13)&chr(10)>

<CFSET MIMEBOUNDARY = "----MIME-BOUNDARY----">

<CFSET contenttype = "multipart/alternative;boundary="""&MIMEBOUNDARY&"""">
<CFSET myHeaders = "X-Mailer: My Mailer, MIME-Version: 1.0">
<CFSET myPlainMsgTop = "--#MIMEboundary##crlf#Content-Type: text/plain; 
charset=us-ascii#crlf#Content-Transfer-Encoding: 7bit#crlf##crlf#">
<CFSET myHTMLMsgTop = "--#MIMEboundary##crlf#Content-Type: text/html; 
charset=us-ascii#crlf#Content-Transfer-Encoding: 7bit#crlf##crlf#">

<!--- Send the messages --->
<CFMAIL To="#recipient#" From="#from#" Subject="#subject#">
<!--- Sean: <cfmailparam> --->
<cfmailparam name="Content-type" value="#contenttype#">
<cfmailparam name="MIME-Version" value="1.0">



#myPlainMsgTop#
<!--- begin plain text version --->
#textbody#

#myHTMLMsgTop#
<!--- begin html version --->
#htmlbody#

</cfmail>


Good Luck! Brook.



At 03:32 PM 04/06/01 -0500, you wrote:
>Does any one have or know of a CF solution for transmitting e-mail campaigns
>using multi-part sensing?
>
>Thank you.
>
>TMWussow:-)
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to