2014-10-04 118 views
3

無法驗證密碼。錯誤:534-5.7.14請通過您的網絡瀏覽器登錄,然後重試。 534-5.7.14瞭解更多534 5.7.14 https://support.google.com/mail/bin/answer.py?answer=78754 wv1sm5867206pab.37 - gsmtp使用codeigniter驗證密碼失敗

function index() { 

    $config = Array(
     'protocol' => 'smtp', 
     'smtp_host' => 'ssl://smtp.googlemail.com', 
     'smtp_port' => 465, 
     'smtp_user' => '[email protected]', 
     'smtp_pass' => '92135108845129', 
     'mailtype' => 'html', 
     'charset' => 'iso-8859-1', 
     'wordwrap' => TRUE 

    ); 

    $this->load->library('email', $config); 
    $this->email->set_newline("\r\n"); 
    $this->email->from('[email protected]', 'Gaurav kwatra'); 
    $this->email->to('[email protected]'); 
    $this->email->subject('This is an email test'); 
    $this->email->message('Emial Testing'); 

     //$this->email->initialize($config); 

    if($this->email->send()) 
    { 
     echo 'Your email sent...!!!! '; 
    } 
    else 
    { 
     show_error($this->email->print_debugger()); 
    } 
} 
//end of code 

我用上面的代碼從笨發送郵件....我有一個錯誤...驗證失敗。密碼正確。

+0

這可能有所幫助:http://stackoverflow.com/a/20645752/1001641 – 2014-10-04 14:11:24

回答

6

你需要去你的賬戶設置https://www.google.com/settings/security,你需要啓用Access for less secure apps這有助於使用谷歌smtp的客戶端。

請看看here

+0

在某些情況下,即使啓用安全性較低的應用程序,此錯誤仍會繼續顯示。 – William 2015-09-10 19:40:43

+1

請注意,您必須等待一小會兒在啓用安全性較低的應用程 – bokan 2016-03-17 17:57:57

+0

下面是提到的設置頁面的新的直接鏈接:https://www.google.com/settings/security/lesssecureapps – 2016-09-21 19:05:51

0

如果仍然甚至不啓用安全性較低的應用程序後,工作 - 您應該在谷歌帳戶中登錄到您的安全區域,查看設備是否已被封鎖。 Google屏蔽了我的服務器,然後我去了https://accounts.google.com/b/0/displayunlockcaptcha,它現在允許我發送。與用戶名或密碼無關,但Google阻止設備訪問。

0

其中一個原因可能是cpanel設置。請嘗試:

  1. 登錄的cPanel
  2. 調整設置>所有>
  3. 「限制傳出SMTP根,進出口,以及郵差(FKA SMTP調整)

選擇 「關閉」