程序代码是这样的
error_reporting(E_STRICT);
date_default_timezone_set(date_default_timezone_get());
include_once('class.phpmailer.php');
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->CharSet = 'utf-8';
$mail->Host = "smtp.163.com";
$mail->From = "[email protected]";
$mail->FromName = "softfc";
$mail->Subject = "Hello world!";
$mail->MsgHTML('hahahhahahh');
$mail->AddAddress("[email protected]");$mail->AddAttachment("images/phpmailer.gif"); // attachmentif(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!";
}
但是运行出现了下面的错误,不知道该怎么修改
Mailer Error: The following From address failed: [email protected]
error_reporting(E_STRICT);
date_default_timezone_set(date_default_timezone_get());
include_once('class.phpmailer.php');
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->CharSet = 'utf-8';
$mail->Host = "smtp.163.com";
$mail->From = "[email protected]";
$mail->FromName = "softfc";
$mail->Subject = "Hello world!";
$mail->MsgHTML('hahahhahahh');
$mail->AddAddress("[email protected]");$mail->AddAttachment("images/phpmailer.gif"); // attachmentif(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!";
}
但是运行出现了下面的错误,不知道该怎么修改
Mailer Error: The following From address failed: [email protected]
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货