Openhab.cfg - # / hash / pound sign in password

Hi folks, i have one brief question:
Lets say my email password is my#password. Now I want to configure that password into the value of “mail:password=”. How do I escapte that hash/pound sign to make it not being treated as a comment?
All other values are correct so it seems to be the password that keeps the mail action from working properly. I tried a backslash ( \# ) and surrounding the whole password with double-quotes ( “my#password” ) but nothing worked. I did a restart of openhab after each change in the openhab.cfg.
Please do not suggest to simply change the password :wink:

While searching around I found:
Put the pound sign (and only the pound sign) in quotes or
use %23 or
change your password :grin:

I’m using openhab2 and put my settings in mail.cfg
I also have a pound sign in my password.

Using this in mail.cfg still gives credentials error

What about


I tried it but unfortunately not working for me.
I have changed to another smtp host and that one is working in openhab2

1 Like