Avatar of Lordgobbledegook

asked on 

PHP Automatically Processing Bounced Emails in Newsletter Script

Hi experts,

I am currently writing an email newsletter script.  People can subscribe to a newsletter and I will email "en masse" every few weeks.  This is in progress and very easy to do.

Every newsletter there will be a number of bounced emails.  These will go back to  newsletter@mydomain.com

I would like PHP to check this email address and extract the address of any emails that have bounced back.  Armed with this I can then remove / flag, etc any invalid email addresses.

Does anyone have a code snippet or a website with a tutorial that will do this?  My Googling has come up short.  In short, PHP needs to:

- check email
- extract bad email addresses into a variable / array, etc
- delete email

Thank you all in advance.

Avatar of undefined
Last Comment

8/22/2022 - Mon