I
can't find the exact code that I am planning on using (it is hidden in my test
environment somewhere), but something like this should do:
<CFSET PlainTextMessage =
ReplaceNoCase(HTMLMessage,"<br>",chr(13) & chr(10), "all")>
<!--- Convert Line Breaks --->
<CFSET PlainTextMessage = ReplaceNoCase(PlainTextMessage
,"<p>",chr(13) & chr(10) & chr(13) & chr(10), "all")>
<!--- Convert Paragraphs
--->
<CFSET PlainTextMessage = ReReplaceNoCase(PlainTextMessage ,
"<[^>]*>", "", "all")> <!--- Strip HTML
--->
It
isn't always perfect. You may want to create something that removes everything
before and including the <body> tag before running the above
code.
-----Original Message-----
From: William Vernon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 26, 2002 2:07 PM
To: inFusion Support List
Subject: [iMS] HTML Message --> Text MessageHi all,Does anyone have a good way to automatically convert/parse the HTML content for the HTML side of the message to use on the Text side?Right now I'm doing a LOT of replace() and it's getting ridiculous...Thanks, Bill----
317.423.3568 http://4omega.com
William Vernon Omega Design Studio, Inc.
President 18 North Belmont Ave., Suite 16
Indianapolis, IN 46222
This list server is Powered by iMS
"The Swiss Army Knife of Mail Servers"
To leave this list please complete the form at http://www.coolfusion.com/iMSSupport.cfm
Need an iMS Developer license? Sign up for a free license here: http://www.coolfusion.com/iMSDevelopers.cfm
List archives: http://www.mail-archive.com/infusion-email%40eoscape.com/
Note: You are subscribed as [email protected]
