Registry / communication / node-red-node-email

node-red-node-email

JSON →
library5.2.3jsnpmunverified

node-red-node-email provides a set of nodes for the Node-RED visual programming environment, enabling users to easily send and receive emails within their flows. The current stable version is 5.2.3. The package offers an 'Email (input)' node to fetch messages from IMAP or POP3 servers, and an 'Email (output)' node to send emails via SMTP. It supports modern authentication methods such as OAuth2.0 for Exchange/Outlook 365 and application-specific passwords for Gmail, which are crucial for two-factor authentication setups. Releases are tied to Node.js version requirements, with recent versions requiring Node.js v20 or newer, and major updates often introducing breaking changes related to authentication mechanisms. Its primary differentiator is seamless integration into Node-RED, abstracting complex email protocols into configurable visual components, allowing for robust email automation directly within flows.

npm install node-red-node-email
INSTALL
IMPORT
SIG · NODE-RED-NODE-EMAI
N
node-red-node-email
communicationjavascriptv5.2.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Email Input Node
Install 'node-red-node-email' via Node-RED's 'Manage Palette' or `npm i node-red-node-email` in your Node-RED user directory.
import { EmailInputNode } from 'node-red-node-email';
This package provides nodes for the Node-RED environment; direct JavaScript module imports are not applicable. Nodes appear in the Node-RED editor palette after installation.
Email Output Node
Install 'node-red-node-email' via Node-RED's 'Manage Palette' or `npm i node-red-node-email` in your Node-RED user directory.
const EmailOutputNode = require('node-red-node-email').output;
Node-RED nodes are installed into the Node-RED runtime and configured visually, not through programmatic imports in user JavaScript files.
Email MTA Node
Install 'node-red-node-email' via Node-RED's 'Manage Palette' or `npm i node-red-node-email` in your Node-RED user directory.
import { EmailMtaNode } from 'node-red-node-email/mta';
The 'email-mta' node saw a breaking change in v4 regarding password handling. Users must re-enter credentials after upgrading.

This code prepares a message object (`msg`) within a Node-RED Function node, which the 'Email (output)' node then uses to send an email with a subject, body, sender, recipient, and optional attachments.

// This JavaScript snippet demonstrates preparing an email message object // within a Node-RED Function node, which can then be wired to an // 'Email (output)' node for sending. // Set the email recipient msg.to = "recipient@example.com"; // Set the email subject msg.topic = "Automated Report from Node-RED"; // Set the email sender (may require valid credentials for the SMTP server) msg.from = "no-reply@yourdomain.com"; // Set the email body (plain text or HTML) msg.payload = "Hello,\n\nThis is an automated email report generated by Node-RED.\n\nRegards,\nYour System"; // Optionally, add an HTML version of the body // msg.html = "<h1>Automated Report</h1><p>Hello,</p><p>This is an <b>automated email report</b> generated by Node-RED.</p><p>Regards,<br/>Your System</p>"; // Optionally, add attachments (using Nodemailer format) msg.attachments = [ { filename: 'data.txt', content: 'Content of the attached file, for example: Key=Value\nStatus=OK', contentType: 'text/plain' } ]; // Return the modified message object for the next node in the flow return msg;
Debug
Known issues
breakingVersion 4.x introduced a breaking change for the `email-mta` node. Users must re-enter any user/passwords for authenticating incoming mail due to a property clash.
fix
After upgrading to v4.x, reconfigure the user and password fields for `email-mta` nodes in your Node-RED flows.
affects: >=4.0.0
breakingNode.js version requirements have significantly increased. Version 3.x requires Node.js v18+, and the current 5.x series requires Node.js v20.0.0 or newer.
fix
Ensure your Node-RED environment is running on Node.js v20.0.0 or newer. Check Node-RED documentation for upgrading your Node.js version.
affects: >=3.0.0
gotchaFor GMail users, traditional password authentication is often insufficient. You will likely need to generate an application password or enable 'less secure app access' (though the latter is discouraged by Google).
fix
Visit your Google account settings to generate an application password or adjust 'less secure app access' settings as required for your GMail account.
affects: >=1.0.0
gotchaFor Exchange and Outlook 365, direct username/password authentication is often deprecated or requires specific configurations. OAuth2.0 is the recommended and often mandatory authentication method.
fix
Register an application through the Microsoft platform and configure your `Email` node to use OAuth2.0, providing the necessary access tokens.
affects: >=1.0.0
gotchaThe `msg.from` property, if set, might be ignored or result in '(No Sender)' if the email address is not a valid userid or an email address associated with the sending mail server's credentials.
fix
Ensure the email address provided in `msg.from` is valid and authorized by your SMTP server for sending emails through the configured account.
affects: >=1.0.0
gotchaSending emails with self-signed SSL/TLS certificates can cause Nodemailer (used internally by this package) to refuse sending the message.
fix
If using self-signed certificates, consult your SMTP server documentation or Nodemailer settings (if exposed by the node configuration) to allow insecure TLS connections, or obtain valid certificates.
affects: >=1.0.0
Errors
Common errors & fixes
Failed to connect: 535-5.7.8 Username and Password not accepted. Learn more at
Incorrect credentials, or modern email providers like Gmail/Outlook requiring application-specific passwords or OAuth2.0.
fix
For Gmail, generate an App Password. For Outlook/Exchange, configure OAuth2.0. Double-check username and password entries in the node configuration.
Error: self-signed certificate in certificate chain
The email server uses a self-signed or untrusted SSL/TLS certificate, and Nodemailer (used by the node) rejects it for security reasons.
fix
If safe to do so in your environment, try to find an option within the Email node configuration to disable SSL/TLS certificate verification, or install the server's certificate into your system's trust store.
Error: ETIMEDOUT or ECONNREFUSED
Network connectivity issues, incorrect server address, or firewall blocking the SMTP/IMAP/POP3 port.
fix
Verify the email server address and port in the node configuration. Ensure network connectivity from your Node-RED instance to the email server, and check firewall rules.
(No Sender) appears in the sent email's 'From' field, or `msg.from` is not respected.
The configured mail server does not allow arbitrary `FROM` addresses or requires `msg.from` to match the authenticated user.
fix
Set `msg.from` to an email address directly associated with the account used for authentication, or leave it blank to let the server use its default sender.
Upgrade
Version history
5.2.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources