Hi Sir,
I'm having issues while sending emails using Zoho smtp from my server.
I'm getting issue:
- Severity: Warning
- Message: fsockopen(): Peer certificate CN=`serv.makeallwebsites.com' did not match expected CN=`smtp.zoho.com'
- Filename: libraries/Email.php
I already checked and confirm my SSL certificate validity and it has no issues.
You can too check it from
here
and my code to send email:
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.zoho.com',
'smtp_port' => 465,
'smtp_user' => SENDER_EMAIL, // change it to yours
'smtp_pass' => SENDER_PASS, // change it to yours
'mailtype' => 'html',
'charset' => 'utf-8', //iso-8859-1
'wordwrap' => TRUE,
'newline' => "\r\n"
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from(SENDER_EMAIL);
$this->email->to(SENDER_EMAIL);
$this->email->subject("Job-Request");
$this->email->message($content);
//$this->email->attach($path.'/'.$file_name);
if($this->email->send())
{
echo 'Email send.';
}
else
{
show_error($this->email->print_debugger());
}
Please help me to solve this issue