Results 1 to 2 of 2
  1. #1
    Full Member Code Monkey's Avatar
    Join Date
    June 11th, 2007
    Using 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.

  2. #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

  3. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. AM sends email out to Affiliate list with our email Address Showing
    By glittered in forum Commission Junction - CJ
    Replies: 27
    Last Post: January 26th, 2007, 11:06 PM
  2. Email address ina SQL database... How to send out mass email?
    By jackson_media in forum Programming / Datafeeds / Tools
    Replies: 4
    Last Post: February 12th, 2006, 03:54 PM
  3. CWD Kids Termination and Bounced Email...
    By flamingoworld in forum Commission Junction - CJ
    Replies: 2
    Last Post: February 25th, 2004, 08:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts