System failed to email invoice 000X - SSL/Encryption Error

My system is failing to send emails. I’m connecting to my own SMTP server with a valid SSL certificate for the mail server address. I also setup an SSL certificate for InvoiceNinja through Let’s Encrypt.

I tried variations of the .env file with and without TLS but all fail with this error message:

Unable to connect with STARTTLS: stream_socket_enable_crypto():SSL operation failed with code 1. OpenSSL Error messages:
error:0A000086:SSL routines::certificate verify failed

Any idea’s what could be the issue?


@david do you have any suggestions to debug this?

In the config/mail.php file you may want to set verify_peer = false

Thank you @david that did it.