Results 1 to 2 of 2
August 21st, 2008, 10:40 AM #1Using PHP to gather email address from bounced email
So I built my own PHP program to email out my newsletter. I use a MYSQL database to keep all the recipient email addresses. I then set it up as a CRON job.
I get some email bounced back saying 'failure notice'. (bad email addresses)
I'd like to remove these email address from my MYSQL database. Is there a way, with PHP, to determine the original recipient email address? Once I have that, I can easily delete it from the database. My trouble is, I don't know how to use PHP to open each bounced email and obtain the original recipient address..
Yes, I could do all this manually, but that would take a lot longer than writing a program..
Edit: Also, can anyone tell me how to use PHP to open an email? (if possible)
Last edited by Code Monkey; August 21st, 2008 at 11:08 AM.
August 22nd, 2008, 10:09 AM #2
- Join Date
- June 3rd, 2007
- the Netherlands
I suppose you get an email saying error etc etc. In that case what I would do (haven't done it but in theory) I would first use an emailaddress that i can access thru the web and only use it as a postmaster email to send the mail and receive errors.
Next I would use cURL to automate the login into the email account once a day, Check open emails and if there is an errormessage act accordingly.
To do this all you will need to know the basic layout of the error message so you can program it to look for certain strings
A nice ebook about php cURL combination with working examples on how to login can be found at http://curl.phptrack.com/index.php
By glittered in forum Commission Junction - CJReplies: 27Last Post: January 26th, 2007, 11:06 PM
By jackson_media in forum Programming / Datafeeds / ToolsReplies: 4Last Post: February 12th, 2006, 03:54 PM
By flamingoworld in forum Commission Junction - CJReplies: 2Last Post: February 25th, 2004, 08:32 PM