即使使用SMTP,我也无法发送邮件。几天前,相同的代码工作正常。
我收到以下消息
SMTP - >错误:服务器不接受数据:552 Nz4mckYiQgZ8h :: auth ::因垃圾邮件或病毒内容而被拒绝的邮件::请包含 联系support :: v = 2.1 cv = S5F5uNYP c = 1时的整个消息 sm = 1 tr = 0 p = DNfEhoIXAAAA:8 a = dRZi5ZaG1PHMBT + NcrGb8g ==:117 a = L9H7d07YOLsA:10 a = 9cW_t1CCXrUA:10 a = s5jvgZ67dGcA:10 a = 8nJEP1OIZ-IA:10 a = cDqdM3_RAAAA:20 a = pGLkceISAAAA:8 a = Fipbmfv_9jaJWARIFGEA:9 a = AJk-FuyA79Q3bGqj:21 a = wPNLvfGTeEIA:10 a = 93v7MKg8FR1F7PZvwgsN:22 a = 6kGIvZw6iX1k4Y-7sg4_:22 :: 100.00
SMTP - >错误:RSET失败:邮件程序错误:SMTP错误:数据没有 接受。
<?php
$mail = new PHPMailer(); // create a new object
$mail->IsSMTP(); // enable SMTP
$mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only
$mail->SMTPAuth = true; // authentication enabled
$mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail
$mail->Host = "smtpout.secureserver.net";
$mail->Port = 465; // or 587
$mail->IsHTML(true);
$mail->Username = "contactus@vowsforeternity.com";
$mail->Password = "xxxxxxx";
$mail->AddReplyTo('contactus@vowsforeternity.com');
$mail->From = "contactus@vowsforeternity.com";
$mail->FromName = "contactus@vowsforeternity.com";
$mail->IsHTML(true);
$mail->Subject = "xxxxxxxxxxx";
$msg='HTML';
$msg=urlencode($msg);
$mail->Body =$msg;
$mail->AddCC("xxxxxxxxxxxxxxx");
$mail->AddBCC("xxxxxxxxxxxxx");
$mail->AddAddress("xxxxxxxxxxxx");
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message has been sent";
}
?>