Node-REDを運用しているときに、異常が発生したときにメールで連絡する方法として、下記のライブラリーがあります。
node-red-node-email (node) – Node-RED
node-red-node-emailとは?
node-red-node-emailは、シンプルにNode-REDでメールの送受信をするためのライブラリです。

Input Node

IMAPまたはPOP3サーバからメールを取得し、まだ見ていない場合はメッセージとして転送します。
メール件名 | msg.topic |
---|---|
メール本文 | msg.payload (プレーンテキストのメールの場合) msg.html (text/htmlメールの場合) |
送信者 | msg.from |
日時 | msg.date |
ヘッダー | msg.header |
Output Node
msg.topicを件名
msg.payload 本文(htmlも可)。
msg.payloadがbinary bufferだとメールの添付ファイルになり、その場合、ファイル名は msg.filename で指定します。オプションで、本文に msg.description を追加することができます。
msg.attachments には nodemailer フォーマットの添付ファイルを 1 つ以上配列で指定します。

このようなフローを作成。

email Outputノードに必要事項を記載。

このようにタイムスタンプが送信されました。
メール送信内容をいじる

このようにtemplateノードを使用。

中身はこのとおり。

このように、変数をいれこむことができました。

Injectノードのmsg.topicにメール件名を入力して送信。

このように件名がはいり受信できました。
まとめ
Node-REDからメールの送信はこのライブラリーを使えばできそうです。
あとは、画像を送信する方法についても引き続き検証していきます。