I figured out why you have those garbage chars at the end (the cf-generated
boundary).

Look at your last content boundary statement... see the extra two dashes at
the end?  The boundaries should all be identical.  Remove those and your
messages will no longer have the junk visible at the end.

This inaccuracy was also an error in my original post, but I fixed it later
on.  That sent me back to the code I use (posted at the top of this thread),
and I found the problem *there*  was the boundary name (I used your method)
how the text of the cfmail was laid out. (you need to have line spacing in
the body area exactly as shown, and cfmailparams must be at the top rather
than the bottom), and the cfmailparam for MIME type must be removed.

The code below works on my CFMX dev box, and should also work fine for older
vers, although since I'm stuck on my laptop for the next few days I can't
test that assumption.

Cheers,

--Matt--

<cfscript>
variables.CleanOutput=ReplaceNoCase(attributes.TaggedInput,"<li>","-","all")
;
variables.CleanOutput=ReplaceNoCase(variables.CleanOutput,"&amp;","and","all
");
variables.CleanOutput=ReplaceNoCase(variables.CleanOutput,"&nbsp;","
","all");
variables.CleanOutput=Replace(variables.CleanOutput,"#chr(13)##chr(10)#","#c
hr(13)##chr(10)##chr(13)##chr(10)#","all");
variables.CleanOutput=REReplace(variables.CleanOutput,"<[^>]+>","","all");
variables.CleanOutput=REReplace(variables.CleanOutput,"[[:space:]]*#chr(13)#
#chr(10)#[[:space:]]*#chr(13)##chr(10)#","#chr(13)##chr(10)##chr(13)##chr(10
)#","all");
variables.Boundary="ContentBoundary";
variables.ContentType="multipart/alternative; boundary="& CHR(34) &
#variables.boundary# & CHR(34);
</cfscript>
<cfmail
 to="#Attributes.MailTo#"
 from="#attributes.MailFrom#"
 server="#attributes.EmailServer#"
 subject="#attributes.Subject#"
 type="HTML">
<cfmailparam name="Reply-To" value="#Attributes.MailTo#">
<cfmailparam name="Content-Type" value="#variables.ContentType#">
<cfmailparam name="Message-ID"
value="<#CreateUUID()#@#attributes.EmailServer#>">
--#variables.Boundary#
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

#variables.CleanOutput#

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

#attributes.TaggedInput#

--#variables.Boundary#
</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