I am writing some code for a newsletter. I would like to be able to remove any "Undeliverable" email address from our recipients list. I'm using the following code:
<cfpop server = "server" username = "user" password = "pwd" action = "GETHEADERONLY" NAME = "msg" > <ul> <cfoutput query = "msg"> <cfif #subject# CONTAINS "Undeliverable"> <cfset msguid=#uid#> </cfif> </cfoutput> <cfpop server = "server" username = "user" password = "pwd" action = "GETALL" uid = #msguid# NAME = "body" > <cfoutput query = "body"> <li>From: #from# - To: #to# Subject: #subject# -Date #date#<br>Body: #body# </cfoutput> <UL> It returns a string that looks like this: From: System Administrator - To: Luis Lebron Subject: Undeliverable: Test message -Date Thu, 12 Dec 2002 07:44:24 -0600 Body: Your message To: '[EMAIL PROTECTED]' Subject: Test message Sent: Thu, 12 Dec 2002 07:44:12 -0600 did not reach the following recipient(s): '[EMAIL PROTECTED]' on Thu, 12 Dec 2002 07:44:24 -0600 The recipient name is not recognized The MTS-ID of the original message is: c=US;a= ;p=sigmainteractive;l=SIGMA2-021212134412Z-565 MSEXCH:IMS:SIGMA:Huntsville:SIGMA2 3550 (000B09AA) 550 [EMAIL PROTECTED] unknown user account Test How can I extract the recipient's name from this string? thanks, Luis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.