i have a simple config email for send an email.
$this->load->library('email');
$config['smtp_crypto'] = 'tls';
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'smtp.gmail.com';
$config['smtp_port'] = 587;
$config['smtp_timeout'] = '5';
$config['smtp_user'] = 'hi*****y@gmail.com';
$config['smtp_pass'] = '*****';
$config['charset'] = 'utf-8';
$config['newline'] = "\r\n";
$config['mailtype'] = 'html'; // or html
// $config['validation'] = TRUE; // bool whether to validate email or not
$this->email->initialize($config);
$message = "content";
$this->email->from("hikmatfauzy@gmail.com", "judul");
$this->email->to("hikmatfauzy7@gmail.com");
$this->email->subject("judul");
$this->email->message($message);
$this->email->send();
echo $this->email->print_debugger();
I get this error message below. how can i do? i tried on my xampp server but running well. but on IIS i got this error.
A PHP Error was encountered Severity: Warning
Message: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Filename: libraries/Email.php
Line Number: 1703
NOTE:
- I changed $config['smtp_port'] from 465/587/25 (still got the error).
- I changed my php.ini openssl extension (still got the error).