node-red-nodes/social/email
Dave Conway-Jones c830e461ea Bump email node package version
should have been part of previous fix…. darn.
2016-06-27 12:03:31 +01:00
..
locales/en-US Email rework (#195) 2016-04-20 19:47:23 +01:00
61-email.html Add cc and bcc options to email node 2016-06-03 16:14:20 +01:00
61-email.js Allow Email node to select folder other than INBOX 2016-06-27 12:01:29 +01:00
LICENSE add email node to node-red-nodes, fix lint etc 2015-06-13 18:53:02 +01:00
README.md Email rework (#195) 2016-04-20 19:47:23 +01:00
package.json Bump email node package version 2016-06-27 12:03:31 +01:00

README.md

node-red-node-email

Node-RED nodes to send and receive simple emails.

Pre-requisite

You will need valid email credentials for your email server.

Install

Run the following command in your Node-RED user directory - typically ~/.node-red

    npm i node-red-node-email

Usage

Nodes to send and receive simple emails.

Input

Repeatedly gets emails from an IMAP or POP3 server and forwards them onwards as messages if not already seen.

The subject is loaded into msg.topic and msg.payload is the plain text body. If there is text/html then that is returned in msg.html. msg.from and msg.date are also set if you need them.

Additionally msg.header contains the complete header object including to, cc and other potentially useful properties.

Note: this node only gets the most recent single email from the inbox, so set the repeat (polling) time appropriately.

Uses the imap npm module.

Output

Sends the msg.payload as an email, with a subject of msg.topic.

The default message recipient can be configured in the node, if it is left blank it should be set using the msg.to property of the incoming message.

The payload can be html format.

If the payload is a binary buffer then it will be converted to an attachment.

The filename should be set using msg.filename. Optionally msg.description can be added for the body text.

Alternatively you may provide msg.attachments which should contain an array of one or more attachments in nodemailer format.

Uses the nodemailer npm module.