[SOLVED] Missing final '@domain' in string


when trying to send e-mail, the following error is occuring :

[ERROR] [rg.openhab.action.mail.internal.Mail] - Could not send e-mail to ‘toaddress@domain.tld’.
org.apache.commons.mail.EmailException: javax.mail.internet.AddressException: Missing final ‘@domain’ in string ``“fromaddress@domain.tld”’’

of course no mail is send out.

Any input welcome.

What is the “from” property in your services/mail.cfg file? Did you see the comment there that says “do not use quotes”? Maybe that is the problem?

the from is without quotes.


when I change the e-mail address in mail.cfg to fromaddress2@domain.tld, in the openhab.log the same error with the same original e-mail address (fromaddress1@domain.tld) occurs.

this means that mail.cfg is not used, and because there is an e-mail address that i recognize (something that I did put in somewhere), another configuration file is used.

that lead me to /userdata/config/org/openhab/mail.config.

whatever I put i the mail.config or mail.cfg (with or without quotes), in the log, there is always the same from address (fromaddress1@domain.tld).

What could be another location where that is configured ?

In which folder is your mail.cfg? IMHO it should be in services/mail.cfg

Like I said,
there is /conf/services/mail.cfg
there is /userdata/config/org/openhab/mail.config.

changing either of them (with or without quotes), openhab.log always gives the same error :
Missing final ‘@domain’ in string ``“fromaddress@domain.tld”’’

content of these files :





Stop openHAB. Delete mail.config. This is an auto generated “cached” version. Get your mail.cfg the way you want it, then reboot. (mail.config will be recreated)

@rossko57 : That worked out just fine.
Thanks !

1 Like

I always forget this .cfg / .config issue, good job that you found the clues. It usually seems to be behind any configuration weirdness in 1.x services & bindings.