---
title: "node-red-node-email • FlowFuse Integrations"
description: "FlowFuse builds your first industrial solution with your team, proves it at one plant, then helps you roll it out to every plant, faster each time."
canonical_url: "https://flowfuse.com/integrations/node-red-node-email/"
meta:
  "og:description": "FlowFuse builds your first industrial solution with your team, proves it at one plant, then helps you roll it out to every plant, faster each time."
  "og:title": "node-red-node-email • FlowFuse Integrations"
---

> Index of every page on this site: [llms.txt](https://flowfuse.com/llms.txt)

# **node-red-node-email**

Node-RED nodes to send and receive simple emails.

**Version:** 5.2.5**Weekly Downloads:** 26,841**Author:**Dave Conway-Jones**Updated:** Jul 11, 2026

# node-red-node-email

[Node-RED](http://nodered.org) nodes to send and receive simple emails.

**v6 Breaking Change**

The underlying nodemailer library has introduced a breaking change which by default enforces checking for valid TLS certs. This can be turned off per connection, but is opposite to the previous default.

## Pre-requisite

You will need valid email credentials for your email server. For GMail this may mean getting an application password if you have two-factor authentication enabled.

For Exchange and Outlook 365 you must use OAuth2.0.

## Install

You can install by using the `Menu - Manage Palette` option, or running the following command in your Node-RED user directory - typically `~/.node-red`

```
    cd ~/.node-red
    npm i node-red-node-email
```

## GMail users

If you are accessing GMail you may need to either enable [an application password](https://support.google.com/mail/answer/185833?hl=en), or enable [less secure access](https://support.google.com/accounts/answer/6010255?hl=en) via your Google account settings.

## Office 365 users

If you are accessing Exchange you will need to register an application through their platform and use OAuth2.0. [Details on how to do this can be found here.](https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth#get-an-access-token)

## Usage

Nodes to send and receive simple emails.

### Input node

Fetches 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.

Modern authentication through OAuth2.0 is supported, but must be triggered by an incoming access token and can only be automatically triggered upstream.

### Output node

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. You can also specify any or all of: `msg.cc`, `msg.bcc`, `msg.replyTo`, `msg.inReplyTo`, `msg.references`, `msg.headers`, or `msg.priority` properties.

The email *from* can be set using `msg.from` but not all mail services allow this unless `msg.from` is also a valid userid or email address associated with the password. Note: if `userid` or msg.from does not contain a valid email address (userxx@some\_domain.com), you may see *(No Sender)* in the email.

The payload can be html format. You can also specify `msg.plaintext` if the main payload is html.

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](https://nodemailer.com/message/attachments/) format.

If required by your recipient you may also pass in a `msg.envelope` object, typically containing extra from and to properties.

If you have own signed certificates, Nodemailer can complain about that and refuse sending the message. In this case you can try switching off TLS.

Use secure connection - If enabled the connection will use TLS when connecting to server. If disabled then TLS is used if server supports the STARTTLS extension. In most cases set this to enabled if you are connecting to port 465. For port 587 or 25 keep it disabled.

This node uses the *nodemailer* npm module.

## Testing

You can pass the credentials object to the `node-red-node-test-helper` by doing the following:

```js
const emailNode = require("./61-email");

const testFlows = [{
    id: "n1", type: "e-mail", name: "Email",
    from: "email1test@example.com", subject: "TestSubject", server: "testServer",
    port: "1111", secure: "X", tls: true, authtype: "BASIC",
}];

const testCredentials = {
    n1: {
        userid: "ExampleUser",
        password: "ExamplePassword",
        global: false
    }
};

it('should be loaded', function (done) {
    helper.load(emailNode, testFlows, testCredentials, function () {
        const n1 = helper.getNode("n1");
        try {
            n1.should.have.property('name', 'Email');
            n1.should.have.property('from', 'email1test@example.com');
            n1.should.have.property('subject', 'TestSubject');
            n1.should.have.property('outserver', 'testServer'); // Gathered via server
            n1.should.have.property('outport', '1111'); // Gathered via port
            n1.should.have.property('secure', 'X');
            n1.should.have.property('tls', true);
            n1.should.have.property('authtype', 'BASIC');
            n1.should.have.property('credentials');
            n1.should.have.property('credentials', {
                userid: "ExampleUser",
                password: "ExamplePassword",
                global: false
            });
            done();
        } catch (err) {
            done(err);
        }
    });
});
```

## **Installation **

Install in Node-RED via the [**palette manager**](https://flowfuse.com/docs/node-red/getting-started/library/#using-the-palette-manager).

![Node-RED Palette Manager dialog with the node selected and the Install button visible.](https://flowfuse.com/images/integrations/palette-manager-install.png)

## **Quick Stats**

Current Version**5.2.5**

Weekly Downloads**26,841**

First Published**Jun 15, 2015**

Last Updated**Jul 11, 2026**

## **GitHub Stats**

[Open Issues ![GitHub Issues](https://img.shields.io/github/issues/node-red/node-red-nodes.svg?style=flat-square)](https://github.com/node-red/node-red-nodes/issues) [ Stars ![GitHub Stars](https://img.shields.io/github/stars/node-red/node-red-nodes.svg?style=flat-square)](https://github.com/node-red/node-red-nodes/stargazers) [ Forks ![GitHub Forks](https://img.shields.io/github/forks/node-red/node-red-nodes.svg?style=flat-square)](https://github.com/node-red/node-red-nodes/network/members)

## **External Resources**

[View on NPM](https://www.npmjs.com/package/node-red-node-email) [ View Repository](https://github.com/node-red/node-red-nodes)

## **Need Help?**

Get professional support for your Node-RED projects with FlowFuse.

[**Contact Us**](https://flowfuse.com/contact-us/)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://flowfuse.com/#website","@type":"WebSite","description":"FlowFuse builds your first industrial solution with your team, proves it at one plant, then helps you roll it out to every plant, faster each time.","inLanguage":"en","name":"FlowFuse","url":"https://flowfuse.com/","alternateName":["FlowForge","Flow Fuse"],"publisher":{"@id":"https://flowfuse.com/#identity"}},{"@id":"https://flowfuse.com/integrations/node-red-node-email/#webpage","@type":"WebPage","description":"FlowFuse builds your first industrial solution with your team, proves it at one plant, then helps you roll it out to every plant, faster each time.","name":"node-red-node-email","url":"https://flowfuse.com/integrations/node-red-node-email/","isPartOf":{"@id":"https://flowfuse.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://flowfuse.com/integrations/node-red-node-email/"]}],"primaryImageOfPage":{"@id":"https://flowfuse.com/#logo"}},{"@id":"https://flowfuse.com/#identity","@type":"Organization","legalName":"FlowFuse Inc.","name":"FlowFuse","url":"https://flowfuse.com","alternateName":["FlowForge","Flow Fuse"],"logo":{"@id":"https://flowfuse.com/#logo"},"sameAs":["https://twitter.com/FlowFuseinc","https://github.com/FlowFuse","https://www.linkedin.com/company/flowfuse/","https://www.facebook.com/FlowFuse/","https://www.youtube.com/channel/UCbBzP8NZbv3WDtlt4UouA-g"]},{"@id":"https://flowfuse.com/#logo","@type":"ImageObject","caption":"FlowFuse","contentUrl":"https://flowfuse.com/handbook/images/logos/ff-logo--square--dark.png","inLanguage":"en","url":"https://flowfuse.com/handbook/images/logos/ff-logo--square--dark.png"}]}
```

## Sitemap

See the full [sitemap](https://flowfuse.com/sitemap.md) for all pages.
