Hello,
This is not actually a problem with the SMTP class, but rather a feature request.
With the release of PHP 5.6 there have been some changes in OpenSSL. Stream wrappers now verify peer certificates and host names by default when using SSL/TLS:
php.net/manual/en/migration56.opens
...
Even with servers like smtp.gmail.com the class now fails TLS connection because of mismatched certificate CN values.
If this is not a coding-related issue, the class needs a way to turn peer verification off.
I solved issue with TLS connection to smtp.gmail.com like this:
1. find line
$this->OutputDebug('Starting TLS cryptograpic protocol');
2. BELOW that line add
$contextOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
),
);
stream_context_set_option($this->connection, $contextOptions );