title: SSL Error in WAMP/XAMPP: stream_socket_enable_crypto(): SSL operation failed
body: <p>A week ago I was testing some components in WAMP with PHPMailer and everything worked correctly. The next day it just stopped working. No configuration in WAMP has changed. Using SMTPDebug this is the following error when I try to send an email:</p>
  
  <blockquote>
    <p>Connection failed. Error #2: stream_socket_enable_crypto(): SSL
    operation failed with code 1. OpenSSL Error
    messages:error:14090086:SSL
    routines:ssl3_get_server_certificate:certificate verify failed
    [C:...\SMTP.php line 404]</p>
  </blockquote>
  
  <p>I did other tests using the x86 version of WAMP and XAMPP (I currently use x64 WAMP) but without success, I get the same error.</p>
  
  <p>All tests were performed with gmail <strong>"Allow less secure apps"</strong> enabled.</p>
  
  <p>After a quick search in the documentation I discovered that the problem is due to verification of the SSL certificate. And as a workaround I can use the following code to skip this check:</p>
  
  <pre><code>$mail-&gt;SMTPOptions = array(
      'ssl' =&gt; array(
          'verify_peer' =&gt; false,
          'verify_peer_name' =&gt; false,
          'allow_self_signed' =&gt; true
      )
  );
  </code></pre>
  
  <p>But as has been said, this is a workaround. I wanted to know where the source of the problem is, I do not understand why it stopped working. I have already tried replacing the certificates in the WAMP / XAMPP folders but without success. Also did extensive research but no results. Any idea how I can solve the certificate verification problem without any workaround?</p>