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 https://support.google.com/mail/bin/answer.py?answer=78754 wv1sm5867206pab.37 - gsmtp

function index() {

     $config = Array(
       'protocol' => 'smtp',
       'smtp_host' => 'ssl://smtp.googlemail.com',
       'smtp_port' => 465,
       'smtp_user' => 'gauravkwt@gmail.com',
       '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('gauravkwt@gmail.com', 'Gaurav kwatra');
     $this->email->to('gaurav.kawatra@ymail.com');
     $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

      

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

+3


source to share


3 answers


You will need to go to your account settings https://www.google.com/settings/security and you need to enable Access for less secure apps

which will help Google smtp for clients.



Please take a look here too

+6


source


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 https://accounts.google.com/b/0/displayunlockcaptcha and it now allows me to submit. Nothing to do with username or password, but Google is blocking access to the device.



0


source


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"

0


source







All Articles