Bounce mail detection using PHP

Discussion in 'PHP' started by samirkumardas, Jul 26, 2008.

  1. #1
    To detect bounce mail I have used following header so that any bounce mail information goes to my desired email. But I dont know why it is not working for me. It does not sent any email to selected email address when I tried to send email to a wrong email address. Could you please help what the wrong here...


    
    
    $to  = 'samnir_21121_9812_sss@testsss.com'; // note the comma
    
    // subject
    $subject = 'Reminders for July';
    
    // message
    $message = '
    <html>
    <head>
      <title>Birthday Reminders for August</title>
    </head>
    <body>
      <p>Here are the birthdays upcoming in August!</p>
      <table>
        <tr>
          <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
        </tr></table>
    </body>
    </html>';
    
    $ar_headers = "MIME-Version: 1.0\r\n"; 
    $ar_headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; 
    $ar_headers .= "X-Priority: 3\r\n"; 
    $ar_headers .= "X-MSMail-Priority: Normal\r\n"; 
    $ar_headers .= "X-Mailer: php\r\n"; 
    $ar_headers .="From: admin@bdjokes.com\r\n";
    $ar_headers .="Return-Path: samir@bdjokes.com\r\n";
    $ar_headers .="Return-Receipt-To: samir@bdjokes.com\r\n";
    $ar_headers .="Reply-To: samir@bdjokes.com\r\n";  
    
    // Mail it
    mail($to, $subject, $message, $ar_headers);
    PHP:


    Your help is very much appreciated.

    Thanks
     
    samirkumardas, Jul 26, 2008 IP
  2. alhelalat

    alhelalat Member

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    type this on the top of your page
    run your script
    the php will show you the error msg
    if you don't know how to fix it
    post the error msg here and i will help you
    cheeeeeeeers
     
    alhelalat, Jul 27, 2008 IP
  3. alhelalat

    alhelalat Member

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    also you might wanna take a look at this
    php.net/manual/en/function.mail.php
     
    alhelalat, Jul 27, 2008 IP