Failed to authenticate password with codeigniter

Failed to authenticate password. Error: 534-5.7.14 Log in to your web browser and then try again. 534-5.7.14 More details ... 534 5.7.14 wv1sm5867206pab.37 - gsmtp

function index() {

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


     $this->load->library('email', $config);
     $this->email->from('', 'Gaurav kwatra');
     $this->email->subject('This is an email test');
     $this->email->message('Emial Testing');


         echo 'Your email sent...!!!! ';
//end of code


I am using above code to send mail with codeigniter .... I have an error ... Authentication failed. The password is correct.


source to share

3 answers

You will need to go to your account settings and you need to enable Access for less secure apps

which will help Google smtp for clients.

Please take a look here too



If it still doesn't work even after enabling less secure apps, then you should log into your security zone on your Google account and see if your device is locked. Google has blocked my server, so I went to and it now allows me to submit. Nothing to do with username or password, but Google is blocking access to the device.



One of the reasons may be cpanel settings. Try:

  • Login to CPanel
  • Settings settings> All>
  • "Limit outgoing SMTP to root, exim and mailman (FKA SMTP Tweak)

And choose "off"



All Articles