How do you get a response from the host when sending mail through mail(s)?



  • An automatic mass mailing of mail to users every first number of new months is arranged through the kroner.

    Somehow the last time, there was a situation that almost all of them had mail only.ru/list.ru, the letters didn't come, although they were sent through the function. mail()

    In this regard, can the remote server ' s response be retrieved and processed in reason of the failure to deliver the letter?



  • Example of documentation

    <?php
    $to      = 'nobody@example.com';
    $subject = 'the subject';
    $message = 'hello';
    $headers = 'From: webmaster@example.com' . "\r\n" .
        'Reply-To: webmaster@example.com' . "\r\n" .
        'X-Mailer: PHP/' . phpversion();
    

    mail($to, $subject, $message, $headers);
    ?>

    There's From and Reply-To pointing out your email and, in general, he's gonna be hit by mail servers if they didn't like anything.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2