0

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:

  1. I changed $config['smtp_port'] from 465/587/25 (still got the error).
  2. I changed my php.ini openssl extension (still got the error).
Hikmat Fauzy
  • 1
  • 1
  • 3
  • Check [here](http://stackoverflow.com/questions/1555145/sending-email-with-gmail-smtp-with-codeigniter-email-library) and try that way. – Tpojka Jun 01 '16 at 11:28
  • thanks for your response, i do the same on your link. but still got error. FYI i tried on xampp with this code running well. Only on IIS i got the error.. – Hikmat Fauzy Jun 01 '16 at 11:34

0 Answers0