views:

32

answers:

1

We manage a website which gives agents the ability to enroll members across the country. At times, the member or agent will enter a bad email address during the enrollment process and important PDF'd information cannot be delivered to the member.

Similarly, an agent may try and recruit a sub-agent and have the same issue.

Is there anyway to automatically redirect returned emails (Delivery Status Notification (Failure)) to the responsible party instead of to our primary email?

i.e. Agent 1 recruits Agent 2. An email is attempted to send from [email protected] but the address for Agent 2 is invalid. The system automatically recognizes the message type, formats and sends Agent 1 a note saying the email he/she entered was bad.

Note: I am using Google Apps Standard for all of our mail delivery currently while our platform is built on php and mysql.

+1  A: 

make a special email for example "[email protected]" and send every mail from this account. after sending a recruiting mali via that account, make shure that you save the destination e-mail adress in your database connected with the according agent who sent that mail so that you can determine who sent that email afterwards. make shure this account is only being used by your app. then make a cronjob for a php script that connects via smtp to that account and let it check out if there is any mail that returned. If there is any email look from where that mail came and look it up in your database and send the notification to the according agent. that's how i would do it.

ITroubs
@iTroubs - thanks. not really solution I was looking for because I dont use the built-in mail functions (MediaTemple's plesk and qmail configuration is abysmal for multiple domains under a single "primary" ip).
JM4