我不能,因为我的生活,弄清楚为什么我收到这个错误。代码如下:
require_once('lib/PHPMailer/PHPMailerAutoload.php');
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = "smtp.gmail.com";
$mail->Port = 26;
$mail->Username = "EMAIL@EMAIL.com";
$mail->Password = "scrambled";
$mail->SetFrom('EMAIL@EMAIL.com', 'Web App');
$mail->Subject = "A Transactional Email From Web App";
$mail->IsHTML(false);
$mail->msgHTML($body);
$mail->AddAddress('EMAIL@EMAIL.com', 'Nomination');
if($mail->Send()) {
echo "Message sent!";
} else {
echo "Mailer Error: " . $mail->ErrorInfo;
}
有人请帮忙!
答案 0 :(得分:0)
$mail->Body = 'blablabla';
另外
$mail->IsHTML(false);
$mail->msgHTML($body);
有点"没有。但是是"。删除第二行。