I have PHP checking a POP3 mail account and looping through the text of each email message. I need an expression that will catch the email addresses from the body of the emails to write to a MySQL database. The emails sent to this account are "returns" or failed emails due to bad addresses that need to be purged from the database. As the emails are generated by various mail server daemons, the structure of the failure message varies...
Some samples would be:
TIA for any help here
-Allen
Some samples would be:
Code:
----- The following addresses had permanent fatal errors ----- <someuser@aol.com>
or
someuser@ft.blahblah.com Mailbox unknown or not accepting mail.
or
<user@msn.com>:
207.46.181.13 does not like recipient.
Remote host said: 550 5.2.1 user@msn.com... Mailbox disabled, not accepting
or
Delivery to the following recipients failed.
someuser@hotmail.msn.com
TIA for any help here
-Allen