0

您好,我正在使用 php mailer 类发送电子邮件。这是脚本:

    include 'phpmailer/class.phpmailer.php';
    $mail = new PHPMailer();

    $mail->IsSMTP();
    $mail->Host     = "smtp.xxxxx.org"; // SMTP server
    $mail->SMTPAuth = TRUE; 
    $mail->Username = 'myname@mynamedomain';   // SMTP username
    $mail->Password = 'password';               // SMTP password

    $mail->SetFrom('my_webmail.address@website.org');
    $mail->Sender = "my_webmail.address@website.org"; 
    $mail->ConfirmReadingTo = 'my_webmail.address@website.org';
    $mail->ReturnPath = "my_webmail.address@website.org";
    $mail->AddReplyTo("my_webmail.address@website.org");

    $mail->Subject = "phpmailer message"; 
    $mail->Body = "bla bla bla"; 

    $mail->AddAddress("whoto@otherdomain.com"); 


   if($mail->Send())  
   { 
   echo 'mail sent'; 
   }  
  else  
  { 
  echo 'Mailer Error: ' . $mail->ErrorInfo; 
  }

它可以工作....但是当用户插入不存在的网络邮件地址时,我无法收到失败的递送通知。有什么建议吗?谢谢

4

1 回答 1

0

Have you checked the similar questions before ask question ? If it is not please check it first.

Check if email exist php

How to check whether an email id exists or not?

于 2013-11-14T18:06:04.363 回答