Actions
Feature #94544
closedAllow more SMTP Configuration Settings (verify_peer)
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Mailer API
Target version:
-
Start date:
2021-07-12
Due date:
% Done:
100%
Estimated time:
PHP Version:
7.4
Tags:
Complexity:
Sprint Focus:
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
Actions