Failed to authenticate password. Error: 534-5.7.14 Please log in via your web browser and then try again. 534-5.7.14 Learn more at 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' => '[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
I use above code to send mail from codeigniter....I have an error...Failed to authenticate. Password is correct.
Authentication. CodeIgniter intentionally does not provide an internal authentication or authorization class. There are a number of great third-party modules that provide these services, as well as resources in the community for writing your own.
You can invoke the command to download the Codeigniter app, though you must have Composer configured in your system. Second method is straightforward, visit Codeigniter site and download the Codeigniter application. You may turn on the feature to errors, go to the app/Config/Boot/production.php and change display_errors prop value to 1 from 0.
And after a few months of disuse I'm on the CI system again and it seems to fail to authenticate the password, be aware that Google will automatically disable this setting when not in use. It's time for you to reactivate it. Thanks for contributing an answer to Stack Overflow!
There are two standard methods to download the codeigniter app. You can invoke the command to download the Codeigniter app, though you must have Composer configured in your system. Second method is straightforward, visit Codeigniter site and download the Codeigniter application.
You would need to go to your account settings https://www.google.com/settings/security and you would need to enable Access for less secure apps
which helps to use the google smtp for clients.
Please have a look here too
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With