PHPMailer - 工作时始终显示消息
PHPMailer - Always show message when it working
我的 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";
}
这不是错误。禁用调试输出:
$mail->SMTPDebug = false;
我的 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";
}
这不是错误。禁用调试输出:
$mail->SMTPDebug = false;