title: PHP (7.1) issue with mail , openssl , certificate
body: <p>In the <strong>php.ini</strong> I have:</p>
  
  <pre><code>[openssl]
  openssl.cafile= /etc/ssl/cert/mydomaincabundle.crt
  </code></pre>
  
  <p>this line allow email from <strong>PHP</strong> with <strong>SMTP</strong> to be sent from PHP es <strong>Wordpress</strong> or PHP application as i use <strong>mydomain.ext</strong> certificate.</p>
  
  <p>Now that I need <a href="https://github.com/composer/packagist/issues/973" rel="nofollow noreferrer">use composer</a> I discovered this line generate SSL error when PHP app like composer try to download data. The error is:</p>
  
  <pre><code>file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
  error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
  Failed to enable crypto
  failed to open stream: operation failed
      Now trying to download from source
  </code></pre>
  
  <p>If i remove the <strong>php.ini</strong> line </p>
  
  <pre><code>[openssl]
  openssl.cafile= /etc/ssl/cert/mydomaincabundle.crt
  </code></pre>
  
  <p>this issue is solved but i start to see all <strong>PHP mail</strong> fail so applications like <strong>Wordpress</strong> etc are unable to <strong>send email</strong>.</p>
  
  <p><strong>How I can have mail working and also solve the PHP SSL issue?</strong></p>
  
  <p>If i remove the <strong>openssl</strong> line with the certificate email sent with <strong>SMTP SSL</strong> will fail.</p>
  
  <pre><code>Connection: opening to ssl://domain.it:465, timeout=300, options=array ()
  Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
  Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): Failed to enable crypto
  Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): unable to connect to ssl://domain.it:465 (Unknown error)
  SMTP ERROR: Failed to connect to server: (0)
  SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
  </code></pre>
  
  <p>Thank you.</p>