nette / mail

A handy library for creating and sending emails in PHP
https://doc.nette.org/mailing
Other
463 stars 70 forks source link

Support self-signed certificates #90

Closed jakubvojacek closed 1 year ago

jakubvojacek commented 1 year ago

Hello

we have some SMTP servers with self signed SSL certificates. They do not work and currently are failing due to stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

Would it be possible to add some configuration option verify = false to be able to make this configuration work?

Seems like laravel/symfony mailers support it (according to https://stackoverflow.com/a/61588084). It would be very nice if Nette would support it as well please.

Thank you Jakub

JanTvrdik commented 1 year ago

Instead of not verifying them, you should add them to trust store. https://www.php.net/manual/en/openssl.configuration.php

jakubvojacek commented 1 year ago

Thanks