我正在尝试在我的服务器(iPage)上运行phpMailer功能,但我无法让它工作。我已经尝试使用gmail来确保脚本很好并且它运行正常。在使用iPage实时帮助和支持票据平台进行了4天以上的故障排除后,我决定与您分享我的问题。
这是我正在使用的功能:
function send_mail($email,$message,$subject) {
require_once('mailer/class.phpmailer.php');
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPDebug = 2;
$mail->SMTPAuth = true;
$mail->SMTPSecure = "tls";
$mail->Host = "smtp.ipage.com";
$mail->Port = 587;
$mail->AddAddress($email);
$mail->AddCC('info@m7b5.com', 'm7b5');
$mail->Username="test@m7b5.com";
$mail->Password="dsdw23dds";
$mail->SetFrom('info@m7b5.com','m7b5');
$mail->AddReplyTo("info@m7b5.com","m7b5");
$mail->Subject = $subject;
$mail->MsgHTML($message);
$mail->Send();
}
}
现在错误代码的第一行:
SMTP -> FROM SERVER:220 ESMTP Sat, 04 Mar 2017 10:31:18 -0500: UCE strictly prohibited
SMTP -> FROM SERVER: 250-bosauthsmtp10.yourhostingaccount.com Hello www.m7b5.com [66.96.143.93] 250-SIZE 34603008 250-8BITMIME 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS 250 HELP
SMTP -> FROM SERVER:220 TLS go ahead
SMTP -> FROM SERVER: 250-bosauthsmtp10.yourhostingaccount.com Hello www.m7b5.com [66.96.143.93] 250-SIZE 34603008 250-8BITMIME 250-PIPELINING 250-AUTH PLAIN LOGIN 250 HELP
SMTP -> FROM SERVER:250 OK
SMTP -> FROM SERVER:250 Accepted
SMTP -> FROM SERVER:250 Accepted
SMTP -> FROM SERVER:354 Enter message, ending with "." on a line by itself
SMTP -> FROM SERVER:250 OK id=1ckBeS-0001xZ-SM
曾经遇到过UCE严格禁止的错误? 我可以用来解决这个问题的任何变通办法吗?
非常感谢!