title: GMail fsockopen(): SSL operation failed error with Codeigniter and XAMPP
body: <blockquote>
  <p>Error message 1: Message: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed</p>
  <p>Filename: libraries/Email.php</p>
  <p>Line Number: 1962</p>
  <p>Error message 2: Message: fsockopen(): Failed to enable crypto
  Error message 3: Message: fsockopen(): unable to connect to &gt;ssl://smtp.gmail.com:465 (Unknown error)</p>
  </blockquote>
  <p><code>php.ini: extension=php_openssl.dll</code> -&gt; uncommented
  I have tried with: <code>openssl.cafile= C:\xampp\perl\vendor\lib\Mozilla\CA\cacert.pem</code>
  I have tried with disabled firewall
  I have tried with another network</p>
  <p>Codeigniter PHP Code:</p>
  <pre><code>$config = Array(
          'protocol'  =&gt; 'smtp',
          'smtp_host' =&gt; 'ssl://smtp.gmail.com',
          'smtp_port' =&gt; 465,
          'smtp_user' =&gt; 'asd@gmail.com',
          'smtp_pass' =&gt; 'asd',
          'mailtype'  =&gt; 'html',
          'charset'   =&gt; 'utf-8'
      );
  
      $this-&gt;load-&gt;library('email', $config);
      $this-&gt;email-&gt;set_newline(&quot;\r\n&quot;);
  
      $this-&gt;email-&gt;from('1@gmail.com', 'asd');
      $this-&gt;email-&gt;to($recipient);
  
      $this-&gt;email-&gt;subject($a);
      $this-&gt;email-&gt;message($b);
  
      $this-&gt;email-&gt;send();
  </code></pre>