SMTP ERROR: Password command failed: 535 Incorrect authentication data

在處理一個使用PHPMailer來發送電郵,我在本地使用個人163郵箱來作測試發送電郵,可以成功的發送電郵;當上傳到正式平臺時,出現了,相似這樣的錯誤信息php

SMTP ERROR: Password command failed: 535 Incorrect authentication data ,SMTP connect() failed.

在2015-03-03下午時,接近下班的時候,我在測試出現的,怎麼也發送不了郵件,當時個人PHPMailer的SMTPDebug是設置爲1的。服務器

到了2015-03-04上午上班時,我也不清楚該如何處理時,我就點擊PHPMailer的examples,在sublime text2點擊每一個*.phps打開預覽裏面的code,我在"examples/smtp.phps" 中看到SMTPDebug的註釋測試

 

//Enable SMTP debugging
// 0 = off (for production use)
// 1 = client messages
// 2 = client and server messages
$mail->SMTPDebug = 2;

 

 

對了,昨天我設置爲1,只能看到"SMTP ERROR: Password command failed: 535 Incorrect authentication data"的消息this

       將SMTPDebug設爲2時,我能夠看到debug消息中,多了"We do not authorize the use of this system to transport unsolicited"這個消息,大概的意思是:咱們沒有委託本系統之外的未受權的服務來轉發郵件。spa

      最後筆者嘗試使用服務器(空間)上面的一個電郵賬號來發送電郵,具體的smtp的資料,須要你看本身服務器(空間)的電郵(email)資料.筆者使用服務器(空間)上面的一個電郵帳戶來發送郵件,能夠發送成功了。如個人網址:www.exapmle.com,能夠使用username@example.com的帳戶來發送電郵。debug

相關文章
相關標籤/搜索