I set up the mail.cfg file and it does attempt to send bt I get in the OH log:
Username and Password not accepted
When editing the mail.cfg, in vscode the password= the accounts password has a # in it. Everything after the # gets colored as a comment. I’m wondering if OH sendMail is truncating the password at the #?
I tried wrapping it with “pwd” and ‘pwd’ neither worked…
But, if it doesn’t work that way, it is far easier to just use the mail node in node-red (since this is where I’m sensing the event anyway) than it is to change passwords on devices all over the place to accommodate OH.
The node-red mail node does handle the # character just fine.
Shame if OH has this restriction, since there are other things that would be nice to get emails about.
You could log an enhancement request for the mail action. It may not be easy to fix, if it involves parsing legacy cfg files. But at least it will get recorded for anyone developing a true v2 mail binding/action.
I’d recommend ssmtp as an option. It’s simple and light weight, can be called from OH using executeCommandLine or the Exec binding, and because it is installed you can get all sorts of useful info from the OS like failed logins, disk health and status, tripwire reports, etc which would never be available from OH or Node Red.