I add two more things, as they are probably errors that may occur more often. In the Karaf Console, the following error may occur:
The solution to this can be found here:
[SOLVED] I having trouble new mail binding
I have solved this as follows for me:
val mailActions = getActions("mail","mail:smtp:<YOUR_THING_ID>")
rule "<YOUR_RULE_NAME>"
when
<YOUR_TRIGGER>
then
...
var receiver="<MAIL_TO@YOUR_RECEIVER>"
var title="<YOUR_TITLE>"
var text="<YOUR_TEXT>"
mailActions.sendMail(receiver, title, text)
...
end