Andrea Olivo

SSL3_GET_SERVER_CERTIFICATE Error with php 5.6

Discussion created by Andrea Olivo on Mar 23, 2017

Hello Everyone,

we're running 7.7.2.1 Enterprise on CentOS.

After the upgrade to php 5.6 we're facing an error in SMTP configuration. We connect to an exchange server and once we try to validate the configuration we have the following error.

error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /mnt/data/varwww/dev/vendor/phpmailer/phpmailer/class.smtp.php on line 325

 

It seems the error is related to PHP 5.6 that verifies certificates on SSL connections, as I've found here:

Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub 

We tried to test the workaround suggested (even it allows insecure connections)

$mail->SMTPOptions = array(    'ssl' => array(        'verify_peer' => false,        'verify_peer_name' => false,        'allow_self_signed' => true    ));

 but the phpmailer deployed with Sugar is version 5.2.9 and doesn't support SMTPOptions property.

(we implement for testing a phpmailer 5.2.22 and it works!)

 

Thank you in advance for any suggestions.

Andrea

Outcomes