Issue Feature Closed

#94544Allow more SMTP Configuration Settings (verify_peer)

varioous OG 07/12/21, 13:11 updated 10/04/22, 14:06

Description

Hi,

I need to send SMTP-Mails with ssl and a self signed certificate. In default configuration from Backend test mail I always receive:

Core: Error handler (BE): PHP Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in /data/www/httpdocs/releases/2021-06-28_19 47/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php line 155

Now I added in the \TYPO3\CMS\Core\Mail\TransportFactory the options to disable verfify check:

$stream = $transport->getStream();
$streamOptions = $stream->getStreamOptions();
$streamOptions['ssl']['verify_peer'] = false;
$streamOptions['ssl']['verify_peer_name'] = false;
$stream->setStreamOptions($streamOptions);

With this change sending works great.

I wish that can add this settings in LocalConfiguration Mail Settings

Reviews 2