Currently, these lists block mail that does not have a text portion.
This means that HTML only email does not get through. I've decided to
try out some code to take those emails that are HTML only and strip
out the HTML while trying to retain some of the line formatting. I
came up with this:
<!--- Replace all breaks with a single carriage return --->
<cfset string=replacenocase(string, '<br>', chr(10), 'all')>
<!--- Remove all HTML tags --->
<cfset string=rereplace(string, '<[^>]+>', '', 'all')>
<!--- If there are 3 or more newlines in a row, turn them into 2
newlines. Some newlines have spaces after them. Finally, trim the
string --->
<cfset string=trim(rereplace(string, '(?:(\n|\r){2}\s*){3,}', '\1\1', 'all'))>

Anyone see a problem here or a way to do it better?

Thanks

-- 
Michael Dinowitz
President: House of Fusion    (http://www.houseoffusion.com)
Publisher: Fusion Authority    (http://www.fusionauthority.com)
Adobe Community Expert / Advanced Certified ColdFusion Professional

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1048
Subscription: http://www.houseoffusion.com/groups/RegEx/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21

Reply via email to