After long searching I came to find out that PHP as from version
PHP 5.65.6
and onwards checks for SSL certificates. Given that our LS is using PHP 7.0 it must be discovering that our email server uses self-signed certificates and has no clue whether to accept them or not. Debug info:
Code:
stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
This is at least what I learnt in the PHPmailer forums, like
here
, where they suggest to add:
Code:
$mail->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
));
Now that brings me to the following questions:
- Does LS have an option to disable certificate checks?
- Or: where could I insert the above code to adapt it myself? Should be at the place where the phpmailer is called
- Or, ideally: how could I tell the server to download the certificates and make sure they're recognised whenever LS wants to mail?