I am working on php framework codeigniter,the email is not sending on localhost I have also removed the port 465 from the anti virus which I am using to send mail and also turned off the anti virus It gives the error " fsockopen(): SSL operation failed with code 1", fsockopen(): Failed to enable crypto
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'ssl://smtp.googlemail.com';
$config['smtp_port'] = 465;
$config['smtp_user'] = '*******@gmail.com'; // change it to yours
$config['smtp_pass'] = '******'; // change it to yours
$config['charset' ] = 'iso-8859-1';
$config['newline' ] = "\r\n";
$config['mailtype' ] = 'text';
$config['validation' ] = TRUE;
$this->load->library('email',$config);
$this->email->from('*********@gmail.com');
$this->email->to('********@gmail.com');
$this->email->subject('Confirmation Email');
$this->email->message('Thank you');
if ($this->email->send())
{
echo "send successfully";
}
else
{
show_error($this->email->print_debugger());
}
This is the code that I have done, can you please resolve this?