I've been busy all morning and I haven't had time to respond to this.

Most of the time to prevent your email from be caught as SPAM you want 
send either plain text or multi-part Test and HTML.  If you send just as 
HTML that will start to trigger in SPAM filters.

I user this function to create a nicely formated text message from an 
HTML message.  The <cfmailpart> tag will let your create a separate text 
portion.

<cfscript>
    
/*####################################################################################
    # 
TextMessage                                                                     
   
#
    # Receive string and return string with any and all tags striped 
out                 #
    # 1. replace <BR> tags with 
CRLF                                                     #
    # 2. Strip all remaining html tags from a string        
                             #
    # 3. return plain text 
message                                                       #
    
####################################################################################*/
    function TextMessage(string) {
        pattern = "<br>";
        CRLF = chr(13) & chr(10);
        message = ReplaceNoCase(#string#, #pattern#, #CRLF# , "ALL");
        pattern = "<[^>]*>";
        return REReplaceNoCase(#message#, #pattern#, "" , "ALL");
    }
</cfscript>

<cfmail query="mailinglist" to="#email#" from="#webmaster#" 
subject="#subject#">
<cfmailpart type="text/plain">#TextMessage(content)#</cfmailpart>
#content#
</cfmail>


-- 
Wil Genovese

One man with courage makes a majority.
-Andrew Jackson

A fine is a tax for doing wrong. A tax is a fine for doing well. 



NUGROHO NOTO wrote:
> Thanks all,
> can you tell me the correct carriage return character should I use... without 
> making this email content just displaying the code ? 
> for example.. if I replace <BR> with \R... it will just show \R instead 
> making a new line. 
> Sorry ... for my stupidity question.
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288377
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to