Funny that true is considered a string and false is not lol
Now i get this
Notification failed '122165': Target{type=CUSTOM, id=my@email.com}, reason=Email send failed: Couldn't connect to host, port: localhost, 25; timeout -1```
Seems like he's trying to connect to itself on standard 25 port
Please provide the startup log section where EmailNotificationHandler is initialised and also the relevant section of your docker compose file (with sensitive data removed).
Looks like an issue with the mechanism the EmailNotificationHandler uses to send the emails; so the initial connection test during initialisation succeeds but it is never able to actually send an email.
This looks like it might be an issue relating to smtps and the static Transport.send() method not picking up the fact that we want smtps so it doesn’t find the configured java mail properties.
I would suggest using gmail’s port 587 with TLS rather than using the SSL endpoint for now until we get this fixed. So this means just remove the OR_EMAIL_TLS, OR_EMAIL_PORT and OR_EMAIL_PROTOCOL environment variables as the defaults should work with gmail.
Seems there was a bigger issue with start TLS config in email notifications; just created a PR that fixes this and once all tests pass it will be merged and a new docker image will be pushed to docker hub in the next hour or so; please try with this and should all work.
Hi, I am also having trouble to get the email to send. I followed the instructions and did a “docker pull openremote/manager” to make sure I have the latest image. I am using smtp.gmail.com mail server. The warning is “Notification failed ‘12802’: Target{type=USER, id=6551ad41-4244-49c0-b7bf-a9988fa73cb4}, reason=Email send failed: 530 5.7.0 Must issue a STARTTLS command first. e21-20020a62ee15000000b0064fdf5b1d7esm732336pfi.157 - gsmtp”.
Any idea how to solve this?
We googling on the above and some said that gmail doesn’t work with STARTTLS but uses TLS. So I changed the setting to
OR_EMAIL_TLS: ${OR_EMAIL_TLS:-true}
After restarting docker, and testing the sending of email, the error changes to not valid email instead of need to issue STARTTLS command first.
Error processing from REALM_RULESET - NOTIFICATION_HANDLER_CONFIG_ERROR (Handler is not valid: email): Notification{name=‘null’, message=org.openremote.model.notification.EmailNotificationMessage@26cb95d3, repeatFrequency=null, repeatInterval=‘null’, targets=[Target{type=USER, id=6551ad41-4244-49c0-b7bf-a9988fa73cb4}]}
Any idea how to solve this?
Thanks.
We switched to another email server (not gmail.com) and it is working now.
Seems like STARTTLS is faulty (at least with gmail). And setting it to use TLS solved the problem.
Hi @pcr
It works now!!
but there is a problem, if i set a rule for an attribute of an asset, (rule=-temp <= 20).
i will received mail regarding temp attribute if the value greater than 20 but when i got mail all attribute values are present on that mail.
Hi @apurba
If you can please share screenshots of the rule configuration and the email received
In my case if I test it with just a boolean attribute that I manually set to true (like this)
I just tested it, apparently the variable %TRIGGER_ASSETS% gets all the attribute with “rule state” configuration item.
I tried with %TRIGGER_ATTRIBUTE% but it didn’t work, and I can’t find it in the code