Smtp & ssl

Hello there,

I debated if this post belongs here or in add-on secontion but since the config part is within openhab.cfg I opted for here.

Ok. I have problems using SSL as uthentication it seems. I basically wonder if the mail:username=some@email.com must be an email address or if it can be something like mail:username=xy1234.

This is my configuration:
mail:hostname=mailout.privat.bahnhof.se
mail:port=465
mail:username=xy1234
mail:password=myownpassword
mail:from=myownstuff@bahnhof.se

I only see: >>>>>Sending data QUIT<<<<<< in the log. No EHLO etc. Also: org.apache.commons.mail.EmailException: Sending the email to the following server failed : mailout.privat.bahnhof.se:465 showing that at least openHAB is resolving the smtp server correctly. Then a whole lot of java errors that may or may not be needed to resolve this according to the original question.

Regards, Toby

The SMTP user name is in whatever format the receiving server needs it to be in. For example, services like Gmail require the full email address, whereas other services may have simple names and not full addresses. You would have to find the information that bahnhof.se requires for using them to send out emails in order to know. For Google, it’s:

mail:hostname=smtp.gmail.com
mail:port=587
mail:username=recipient@email.com
mail:password=sdfjsdfslkdfjsldkfjs
mail:from=yourname@gmail.com
mail:tls=true

Note the mail:tls=true above.