I configured the mail action like this:
# The SMTP server hostname, e.g. "smtp.gmail.com" hostname=mailserver.eu # the SMTP port to use (optional, defaults to 25 (resp. 587 for TLS/SSL)) port=587 # the username and password if the SMTP server requires authentication username=myopenhab password=mypassword # The email address to use for sending mails email@example.com # set to "true", if STARTTLS is enabled (not required) for the connection # (optional, defaults to false) tls=true # set to "true", if SSL negotiation should occur on connection # do not use both tls=true and ssl=true # (optional, defaults to false) #ssl=true # set to "true", if POP before SMTP (another authentication mechanism) # should be enabled. Username and Password are taken from the above # configuration (optional, default to false) popbeforesmtp=false # Character set used to encode message body # (optional, if not provided platform default is used) #charset=
But it doesn’t work and what I see in the log output is the following:
10:11:24.950 [ERROR] [org.openhab.action.mail.internal.Mail] - Could not send e-mail to 'firstname.lastname@example.org'. org.apache.commons.mail.EmailException: Sending the email to the following server failed : mailserver.eu:465
What I am confused about is that the port is 465 and I configured 587. The mail.cfg definitely has the port 587 configured. I already restarted the whole server to be sure that the config was reloaded but it is still the same.
Somebody has an idea what the issue is?