Hello,
I try to send mail via openHAB but it fails whatever I try. Who can help?
I installed the mail binding and created a thing smtp-server as mentioned in the manual.
Next I made a rule when a mail should be send out.
The action part of the script:
actions:
-
inputs: {}
id: “2”
configuration:
type: application/javascript;version=ECMAScript-2021
script: >-
var mailActions = getActions(“mail”,“mail:smtp:e5b47827b7”);var success = mailActions.sendMail("xxxxx@xxxxx", "Test subject", "This is the mail content.")
type: script.ScriptAction
But I also tried type: application/javascript
I do get an error in the log:
org.graalvm.polyglot.PolyglotException: ReferenceError: “getActions” is not defined
- a huge number of lnes and at the end:
2022-12-16 21:12:41.135 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID ‘Watermeter_lekkage’ failed: org.graalvm.polyglot.PolyglotException: ReferenceError: “getActions” is not defined