Why can’t I no longer send email from WordPress via SMTP after upgrading to PHP 5.6?


Do you use WordPress plugins like WP Mail SMTP or Easy WP SMTP? And are you no longer to send email via SMTP with these plugins after updating to PHP 5.6 or higher?

The problem may be in the SSL-certificate on the mail server. A check with http://www.checktls.com/perl/TestReceiver.pl?FULL will easily confirm/deny this.

The recommended fix is of course to get a proper certificate on that mail server, but what if you can’t? Well… There is a quick/dirty fix:

You can modify wp-includes/class-phpmailer.php. Search for:

public $SMTPOptions = array();

and replace this with:

public $SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true

Keep in mind that this mod will revert after each and every (manual/automated) WordPress update!

Was this answer helpful ? Yes (9) / No (0)

Leave a Reply