SMTP - >错误:服务器不接受数据:550此邮件被分类为垃圾邮件,可能无法发送
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "mail.cc.com";
$mail->SMTPAuth = true;
$mail->Username = "info@cc.com";
$mail->Password = "cc";
$mail->From = "cc.com"." <info@cc.com>";
$mail->AddReplyTo("cc1@gmail.com");
$mail->FromName = "info@cc.com";
$mail->AddAddress($climail);
$mail->AddCC("cc1@gmail.com");
$mail->Sender="info@cc.com";
$mail->IsHTML(true);
$mail->WordWrap = 70;
$mail->Subject = $sub;
echo $meegate;
$mail->Body=$meegate;
$mail->SMTPDebug = 1;
$mail->Send();
发送邮件时发生错误..邮件未发送..
答案 0 :(得分:0)
您需要设置SMTP主机以及我猜的端口是465:
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "smtp.gmail.com";
$mail->SMTPAuth = true;
$mail->Username = "info@gmail.com";
$mail->Password = "cc";
$mail->From = "gmail.com"." <info@gmail.com>";
$mail->AddReplyTo("cc1@gmail.com");
$mail->FromName = "info@gmail.com";
$mail->AddAddress($climail);
$mail->AddCC("cc1@gmail.com");
$mail->Sender="info@gmail.com";
$mail->IsHTML(true);
$mail->WordWrap = 70;
$mail->Subject = $sub;
echo $meegate;
$mail->Body=$meegate;
$mail->SMTPDebug = 1;
$mail->Send();