title: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086
body: <pre><code>Warning: fsockopen(): SSL operation failed with code 1. 
  OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in D:\vhosts\abc.com\httpdocs\system\library\mail.php on line 170
  Warning: fsockopen(): Failed to enable crypto in D:\vhosts\abc.com\httpdocs\system\library\mail.php on line 170
  Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) in D:\vhosts\abc.com\httpdocs\system\library\mail.php on line 170
  Notice: Error: (0) in D:\vhosts\abc.com\httpdocs\system\library\mail.php on line 179
  </code></pre>
  <p>My client's website is unable to send out email and above are the error messages when I use SMTP.</p>
  <p>Below are the differences between test and live environments:</p>
  <ol>
  <li><p>It works on testing environment but not on the live server. The testing environment was in linux and the live server is on Windows.</p>
  </li>
  <li><p>My client's email service provider is Google G Suite.</p>
  </li>
  </ol>
  <p>I tried the default PHP mail() and also SMTP.</p>
  <p>Both are unable to send mail.</p>
  <p>Any idea what is the root cause of these issues. How do I fix it? How to avoid this kind of scenarios?</p>