If STARTTLS fails, it throws up something like the following error:
Server Error :: stream_socket_enable_crypto(): Peer certificate CN=`blah.example.com' did not match expected CN=`localhost'
There's no clear indication here that the root cause is starttls, or that the documented workaround is to use MAIL_ENCRYPTION=false to prevent the error.
Can this exception be caught, parsed and replaced with a UI warning message that SMTP TLS has failed and to check the mail config in .env with a reference to https://docs.ixpmanager.org/usage/email/ ?