您好,我正在使用 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;
}
它可以工作....但是当用户插入不存在的网络邮件地址时,我无法收到失败的递送通知。有什么建议吗?谢谢