Has any one been able to get CFMAIL to send mult-part messages with CFMX? 
MY script was working fine prior to mx, but no more. I've tried the 
following code and neither version works. I end up a jumbled mess in my 
email box with the second script and the mime boundary, text and html 
message displayed in the 1st script. The first script here seems to work a 
bit better than the 2nd. The 2nd one creates many line breaks and seems to 
also duplicate lines...

BTW, I believe both of these work with earlier versions of CF.

Script 1 (doesn't work - almost...)

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

<CFSET MIMEBOUNDARY = "----MIME-BOUNDARY----">
<CFSET contenttype = "multipart/alternative;boundary="""&MIMEBOUNDARY&"""">
<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#">

<cfmail
to="#Attributes.header_to#"
from="#attributes.header_from#"
subject="#attributes.header_subject#">

<cfmailparam name="Reply-To" value="#Attributes.header_to#">
<cfmailparam name="Content-type" value="#contenttype#">
<cfmailparam name="MIME-Version" value="1.0">
<cfmailparam name="MIME-Mailer" value="logimail.com">

#myPlainMsgTop#
#Attributes.body#



#myHTMLMsgTop#
#attributes.html#

</cfmail>





Script 2 (really doesn't work....)




<cfset variables.Boundary=Replace(CreateUUID(), "-", "", 'all')>
<cfset variables.ContentType="multipart/alternative; boundary=""#boundary#""">

<cfmail
to="#Attributes.header_to#"
from="#attributes.header_from#"
subject="#attributes.header_subject#"
type="HTML">

--#variables.Boundary#
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


#Attributes.body#


--#variables.Boundary#
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit


#attributes.html#


--#variables.Boundary#--
<cfmailparam name="Reply-To" value="#Attributes.header_to#">
<cfmailparam name="MIME-Version" value="1.0">
</cfmail>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to