【问题标题】:PHPMailer - Always show message when it working [duplicate]PHPMailer - 工作时始终显示消息[重复]
【发布时间】:2019-08-07 16:44:05
【问题描述】:

我的 phpmailer 在我的网站上工作,我的意思是它可以发送电子邮件。

但它总是在发送电子邮件时显示此消息

SMTP -> FROM SERVER:000-XXXX.rumahweb.com ESMTP Exim 4.91 #1 Sun, 17 Mar 2019 05:45:58 +0700 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.

有人有想法吗?

    include "../php/phpmailer/class.phpmailer.php";
/***************** Configuration *****************/

$mail = new PHPMailer;
$mail->IsSMTP();
$mail->SMTPSecure = 'tls';
$mail->Host = "xxxxxxxxxxxx"; //hostname masing-masing provider email
$mail->SMTPDebug = 2;
$mail->Port = 587;
$mail->SMTPAuth = true;
$mail->Username = "xxxxxxxxxx"; //user email
$mail->Password = "xxxxxxxxxxxxx"; //password email
$mail->SetFrom("test@mail.com","Nama pengirim yang muncul"); //set email pengirim
$mail->Subject = "Pemberitahuan Email dari Website"; //subyek email
$mail->AddAddress("woyman11@gmail.com","Nama penerima yang muncul"); //tujuan email
$mail->MsgHTML("Testing…");
$SEND = $mail->Send();
if($SEND){
    echo "OK";
} 
else
{
    echo "Failed to sending message";
} 

【问题讨论】:

    标签: php phpmailer sendmessage


    【解决方案1】:

    这不是错误。禁用调试输出:

    $mail->SMTPDebug = false;
    

    【讨论】:

    • SMTP 代码 220 是连接时的问候消息
    • 谢谢大家..它帮助我
    猜你喜欢
    • 1970-01-01
    • 2013-08-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-14
    • 2011-12-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多