|
邮件发送功能原来可以发送,后来换了服务器不行了,总是报错(SMTP -> ERROR: AUTH not accepted from server: 504 5.7.4 Unrecognized authentication type
SMTP Error: Could not authenticate.)大概意思是SMTP - >错误:AUTH不接受从服务器:504 5 7 4识别身份验证类型SMTP错误:无法验证。
配置代码代码如下:
$this->mail = new PHPMailer(true);
$this->mail->IsSMTP(); // telling the class to use SMTP
$this->mail->CharSet = "utf-8"; // 一定要設定 CharSet 才能正確處理中文
$this->mail->SMTPDebug = 1; // enables SMTP debug information
$this->mail->SMTPAuth = true; // enable SMTP authentication
$this->mail->SMTPSecure = "ssl://pod.outlook.com"; // sets the prefix to the servier
$this->mail->Host = "pod.outlook.com"; // sets GMAIL as the SMTP server
$this->mail->Port = 58; // set the SMTP port for the GMAIL server
$this->mail->Username = "wwww";// GMAIL username
$this->mail->Password = "***"; // GMAIL password
$this->mail->AddReplyTo('www@outlook.com', '来自www.qq.com');
$this->mail->SetFrom('qq@outlook.com', '来自www.qq.com');求大神帮帮忙。
|
|