Based on the example that PHPMailer provides i have the script below,
date_default_timezone_set(\'Etc/UTC\');
require \'./PHPMailerAutoload.php\';
$mail = ne
I was experiencing the exact same error as in the original question (yes 4 years later), and was able to solve it by changing the following within class.smtp.php (in both /includes/classes and /admin/includes/classes if they exist -- otherwise only in the PHPMailer main directory).
Change:
STREAM_CRYPTO_METHOD_TLS_CLIENT
to:
STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT
It has to do with the updating of the TLS version in more recent PHP versions.
Source: https://forums.oscommerce.com/topic/410367-phpmailer-tls-12/