There is a lot on the web, but i didn’t solve it yet.
I am using laminas mail with an SMTP connection to send mail, this works fine on production server, but for testing purposed i also want to use it on my developmentserver. For some reason it does not work there, with the same settings (see below)
$options = new SmtpOptions(array(
'name' => 'maintenanceplus.nl',
'host' => 'mail.antagonist.nl',
'port' => 587,
'connection_class' => 'login',
'connection_config' => array(
'username' => '****',
'password' => '****',
'ssl' => 'tls'
),
));
I am using Apache2 with PHP8.2 on a windows machine.
Error Laminas\Mail\Protocol\Exception\RuntimeException: Unable to connect via TLS
[php:warn] [pid 27056:tid 1220] [client ::1:58629] PHP Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:\nerror:0A000086:SSL routines::certificate verify failed in D:\OneDrive\PHP_projecten\Maintenance.nl\vendor\laminas\laminas-mail\src\Protocol\Smtp.php on line 297, referer: http://maintenance.localhost/user/registreren
And without ssl/tls option
Laminas\Mail\Protocol\Exception\RuntimeException: 5.5.1 Invalid command