Hi all,
I’m running OH 3.3.0 in docker on a QNAP NAS and I am struggling with sending emails. I’ve read through a lot of similar threads in the community but could not find an answer.
This is my test script:
val mailActions = getActions(“mail”,“mail:smtp:mymail”)
mailActions.sendMail(“myemailaddress-replaced”, “Text Subject”, “Text body”)
The mail:smtp:mymail Thing is configured with SSL/TLS, port 465 and all the right DNS name and credentials that I successfully use also for other applications on the NAS for email notification (but not in docker containers).
This is the error I get in the log:
2022-07-06 13:36:21.386 [WARN ] [ab.binding.mail.internal.SMTPHandler] - javax.mail.MessagingException: Could not connect to SMTP host: hostname-replaced, port: 465;
nested exception is:
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
I guess it’s a “stupid” communication problem between the OpenHAB container and the mail server. I would not think it’s a general firewall, etc. issue in my home network because many other applications can send emails successfully, even on the NAS.
Regarding the docker config (NAT configuration), I would not expect that I have to open port 465 in the docker config because it’s communication initiated inside the container to the outside. Or am I wrong? Any other obvious things I may be missing and would need to check or configure?