I'm sure you've run into requests like this before so I'm hoping you have an easy answer for me.
I'm trying to create a record of all email bounce backs that occur when I am sending email via PHP & MySQL.
I only need the "to" and "from" fields. Nothing else, because all the data I need will be in those two fields.
So far I have created a catchall email address where each bounce back will be sent.
Then it is piped to a PHP script which (and this is where I'm stumped) will give me the contents of the "to" and "from" fields.
Once I have that data I can do all sorts of things with it, like keep a db record of it or delete the email address from the db.
I've spent days researching this on the Internet. I've found lots of talk and lots of scripts, but each PHP script I've found falls short in that they do not include or demonstrate a way to actually read the email headers to provide contents of the "to" and "from" fields.
So please, help me with a PHP script that will just read & provide the info I need from an email piped to it.
Thanks for the help,