- Platform information:
Openhab version 4.1.3 on ubuntu 20.04 LTS, x86_64.
I would like to send an email when some item reaches a treshold-value.
I installed the mail-binding and set it up. Then I made a script to send test-mails with just text. That works fine.
I made a test-script using Blockly. Since Blockly can’t send emails, I used “run rule or script with context” with my script to send the mail. That works fine for plain text.
Now I would like to send also the value of that item.
So I used the “context” of that “run rule or script”.
My problem is that I don’t know how to get that value in the mailer-script.
My mailer-script (plain text, DSL) :
val mailActions = getActions("mail","mail:smtp:b56b6b064a");
val success = mailActions.sendMail("someone@example.com", "subject test", "body test");
Blockly :
Thanks.