使用phpmailer发送smtp邮件时提示 SMTP Error: Could not authenticate 错误

使用phpmailer发送smtp邮件时提示 SMTP Error: Could not authenticate 错误

这个错误是验证出现错误,

$mail->Port = 25; //SMTP服务器的端口号
$mail->Host = "smtp.163.com"; ///SMTP服务器
$mail->Username = "123456@163.com"; //SMTP服务器用户名
$mail->Password = "123456"; //SMTP服务器密码

SMTP服务器用户名和密码不能够验证,这里用户名就是你的163帐号,全称,密码是你设置的授权码,不是你的登录密码,

原文地址:https://www.cnblogs.com/gp1991/p/6154911.html