I send mail using CodeIgniter, but it returns this error:
Failed to authenticate password. Error: 535-5.7.8 Username and Password not accepted
Here is my code:
$this->load->library('email');
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 587,
'smtp_user' => '[email protected]',
'smtp_pass' => 'mypass',
'mailtype' => 'html',
'charset' => 'iso-8859-1'
);
$this->load->library('email', $config);
$this->email->from('[email protected]');
$this->email->to('[email protected]');
$this->email->subject('This the test');
$this->email->message('this is the test message');
if (!$this->email->send())
{
echo $this->email->print_debugger();
}
I've configured my Xampp server using this question: How to configure XAMPP to send mail from localhost?