Results 1 to 2 of 2
  1. #1
    Full Member Code Monkey's Avatar
    Join Date
    June 11th, 2007
    Clean Up Email List Script
    Anyone have a PHP script that will open bounced emails, determine the original recipient address, and delete it from an MYSQL database?

    Really, all I need is a script that will open a bounced email and get the contents. I can handle parsing the contents, grabbing the email address, and deleting from the database.
    Stop blaming the parasites, low return days, cookie stuffers, networks, lousy AMs, and TOOLBARS!

  2. #2
    Full Member c4's Avatar
    Join Date
    January 17th, 2005
    This is the code you can use to get e-mail content to $email array. Make sure "#!/usr/bin/php" matches the path to PHP on your server.

    #!/usr/bin/php -q
    /* Get the mail data */
    $email = file ( "php://stdin" );
    /* Break if empty */
    if (!is_array($email ) or implode("", $email ) == "") 
    die('Empty mail');
    /* Now you have all the e-mail lines in the $email array, go through lines to find the one you need... */
    foreach ($email as $line)
    /* Do something ...*/

    Finish the script, upload it to the server, chmod to 755 (if on Linux) then all you need to do is setup your e-mail to pipe emails to the script (for example send mails from "" and set this address to pipe to the script), for example if you have CPanel:

    You'll find more example codes here

    Hope this helps!
    [URL=]Help desk software[/URL]

  3. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. How to keep my affiliate list clean?
    By Decorative Ceiling Tiles in forum Merchant Best Practices Forum
    Replies: 3
    Last Post: June 19th, 2010, 07:02 PM
  2. Replies: 19
    Last Post: July 16th, 2009, 03:09 PM
  3. how to clean up list of websites on CJ profile
    By prix in forum Commission Junction - CJ
    Replies: 4
    Last Post: March 9th, 2009, 07:44 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