This sounds just what I am looking for. Thanks ----- Original Message ----- From: Tim Blair To: [EMAIL PROTECTED] Sent: Friday, June 20, 2003 11:31 AM Subject: [cfmail] RE: [ cf-dev ] Get an email address out of a block of text
The way we've done it is to add an extra header field to the email as it goes out such as : X-TrackID: 24475 That way, as *most* bounce messages send back the header of the email (from looking at our logs it seems to be about 1 in 10 doesn't), we can just use a regex to grab the appropriate ID back (bounce detection written in perl, so perl regex, but you'll get the idea): $email =~ m/X-TrackID:\s*(\d+)/; Once we've got the user ID (or in your case email address) then we can do what we like with it -- set a flag, delete the user, etc etc etc... Modifying the above slightly, you could check for the header field, then use a general regex to parse out an email address from the body if the header's not passed, but be careful cos a lot of bounce messages include things like the message ID or postmaster email address of the undeliverable domain -- you want to make sure you're actually getting the right one. But at the same time, you don't just want to "unsubscribe" _every_ email -- what happens if some oik decides to send an email to the bounce address containing nothing but a huuuuuge list of emails? You don't want to unsubscribe every single one... HTH, Tim. ------------------------------------------------------- RAWNET LTD - Internet, New Media and ebusiness Gurus. Visit our new website at http://www.rawnet.com for more information about our company, or call us free anytime on 0800 294 24 24. ------------------------------------------------------- Tim Blair Web Application Engineer, Rawnet Limited Direct Phone : +44 (0) 1344 393 441 Switchboard : +44 (0) 1344 393 040 ------------------------------------------------------- This message may contain information which is legally privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited. Such notification notwithstanding, any comments, opinions, information or conclusions expressed in this message are those of the originator, not of rawnet limited, unless otherwise explicitly and independently indicated by an authorised representative of rawnet limited. ------------------------------------------------------- -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
