您好,欢迎访问一九零五行业门户网

PHP使用phpmailer发送邮件?

issmtp();$mail->host=smtp.163.com;$mail->smtpauth =true;$mail->username= 18501773419@163.com;$mail->password= x x x x x x;$mail->from = 18501773419@163.com;$mail->fromname= 乐分享weshare;$mail->addaddress($address);$mail->ishtml(true);$mail->subject=$title;$mail->body =$message;

if(!$mail->send()){
return true;

}else{
return false;

}
}
sendmail(18501773419@163.com,测试,你好我是peace);
?>
php使用phpmailer发送邮件,提示没有通过验证(smtp error: could not authenticate. ),注释掉验证代码之后,又显示the following from address failed:?
回复内容: issmtp();$mail->host=smtp.163.com;$mail->smtpauth =true;$mail->username= 18501773419@163.com;$mail->password= x x x x x x;$mail->from = 18501773419@163.com;$mail->fromname= 乐分享weshare;$mail->addaddress($address);$mail->ishtml(true);$mail->subject=$title;$mail->body =$message;

if(!$mail->send()){
return true;

}else{
return false;

}
}
sendmail(18501773419@163.com,测试,你好我是peace);
?>
php使用phpmailer发送邮件,提示没有通过验证(smtp error: could not authenticate. ),注释掉验证代码之后,又显示the following from address failed:?
邮箱需要开启smtp服务,可以在邮箱中设置~ 163邮箱应该会单独分配smtp的密码
(ps: 使用qq邮箱发送要注意端口号不是默认的25!!!)
class.smtp.php没require啊
看下环境的log,并且提高下phpmailer的debug等级看下
其它类似信息

推荐信息