This block library allows sending mails through the mail Thing Actions.
You need the mail binding and a properly configured smtp server Thing.
Blocks
The library has two blocks for sending mail messages.
One block is for sending messages without attachments, the second block allows sending mails with one or more attachments.
Mail can be sent as text or html. Selection is through the dropdown box.
The server has the be the smtp server Thing configured in the mail binding.
It is possible to send mail with a single attachment or multiple attachments.
By default, the block offers the possibility to configure the URL for one attachment.
To send multiple attachments, provided text block needs to be replaced by a list block with multiple text blocks, each containing the URL for an attachment, as illustrated below.
The mail binding supports setting headers on all mails sent from the server onwards. A block to set a header is available. The header should be set before sending a mail. Removing a header from all subsequent mails can be done by setting the header to an empty string.
Changelog
Version 0.3
corrected bug with connecting the thing shadow block
How to I add these Blocks to openhab? I’m currently running 4.0.3 on a Pi 4. I have the Mail binding installed and it is currently working when I write a script, however I am converting to Blockly and these blocks are not included. Any assistance would be appreciated.
Please disregard my last message, I figured it out. I needed to install the source code, which I did and all works great. Thank you for creating these blocks.
Bill
Since the update from OH 4.1 to 4.2.0 the mail action does not work in my blockly scripts anymore. The lib and the existing scripts show only the right part “thing MyThing” of the above shown blocks:
Also the preview in DeveloperTools/BlockLibraries is empty:
I already removed and reinstalled the lib via the Add-on Store and also manually via yaml file without success. Probably this is caused by the large blockly update?