stkoontz
asked on
Tracking Bouncebacks in PHPMailer
I'm setting up a registration system that will allow our administrators to send out emails using PHPMailer. I'd like to track bouncebacks and remove bad email addresses. Is there a way to do this in PHPMailer?
Thanks for giving me a hand,
Steve
Thanks for giving me a hand,
Steve
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What you can do is to set the Return-Path address to where bounced messages go, in a way that you can identify what address is bouncing.
For instance if you send messages to user@domain.com you can set the bounce address to bounce-user=domain.com@you rdomain.co m . Then you set your catch all mailbox in your domain to drop messages to a POP3 mailbox.
Then you can use a PHP POP3 class like this fetch the messages and check the To: header to figure where the bounce message was sent and parse it to extract the original sender address.
If you cannot set a catchall POP3 mailbox, you can still try parse the bounced messages sent to a specific bounce address with a PHP MIME message parser class like this to extract the addresses that are bouncing.
Here is also an article explains what I said in regards of processing inbound email messages in PHP that can be bounces as well.
For instance if you send messages to user@domain.com you can set the bounce address to bounce-user=domain.com@you
Then you can use a PHP POP3 class like this fetch the messages and check the To: header to figure where the bounce message was sent and parse it to extract the original sender address.
If you cannot set a catchall POP3 mailbox, you can still try parse the bounced messages sent to a specific bounce address with a PHP MIME message parser class like this to extract the addresses that are bouncing.
Here is also an article explains what I said in regards of processing inbound email messages in PHP that can be bounces as well.
ASKER
Steve