My project is using Codeigniter and XAMPP. I have used the Codeigniter's email library on PC1 when I started to develop the application. Everything went fine but when I copied the htdocs directory to PC2 at the e-mail sending function says:
Message: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
and
Message: fsockopen(): Failed to enable crypto
and
Message: fsockopen(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error)
I think my e-mail sending function is ok:
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.gmail.com',
'smtp_port' => 465,
'smtp_user' => 'asd@gmail.com',
'smtp_pass' => 'asd',
'mailtype' => 'html',
'charset' => 'utf-8'
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('asd@gmail.com', 'asd');
$this->email->to($c);
$this->email->subject($a);
$this->email->message($b);
$this->email->send();
I have tried many things but it did not work. I think the problem is with the certificate file. How should I set up my certificate and how should I add to the config file? Please give me a detailed manual.