{"id":26581691,"url":"https://github.com/csteinba/node-red-contrib-email","last_synced_at":"2026-05-04T06:37:41.990Z","repository":{"id":158443441,"uuid":"634041741","full_name":"csteinba/node-red-contrib-email","owner":"csteinba","description":"A smtp mail transport node for Node RED.","archived":false,"fork":false,"pushed_at":"2024-06-20T18:28:43.000Z","size":45,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-16T18:21:27.673Z","etag":null,"topics":["email","node","node-red","nodejs"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csteinba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-28T22:10:13.000Z","updated_at":"2024-06-20T18:26:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"1deff4fd-ecea-4fb4-9a7f-f1e57fe5aa3b","html_url":"https://github.com/csteinba/node-red-contrib-email","commit_stats":null,"previous_names":["steineey/node-red-contrib-email"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csteinba%2Fnode-red-contrib-email","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csteinba%2Fnode-red-contrib-email/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csteinba%2Fnode-red-contrib-email/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csteinba%2Fnode-red-contrib-email/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csteinba","download_url":"https://codeload.github.com/csteinba/node-red-contrib-email/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245071665,"owners_count":20556352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","node","node-red","nodejs"],"created_at":"2025-03-23T07:31:17.294Z","updated_at":"2026-05-04T06:37:41.961Z","avatar_url":"https://github.com/csteinba.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-red-contrib-email\n\nSMTP email node for Node-RED\n\n[![npm version](https://img.shields.io/npm/v/node-red-contrib-email.svg?style=flat-square)](https://www.npmjs.org/package/node-red-contrib-email)\n[![install size](https://img.shields.io/badge/dynamic/json?url=https://packagephobia.com/v2/api.json?p=node-red-contrib-email\u0026query=$.install.pretty\u0026label=install%20size\u0026style=flat-square)](https://packagephobia.now.sh/result?p=node-red-contrib-email)\n[![npm downloads](https://img.shields.io/npm/dm/node-red-contrib-email.svg?style=flat-square)](https://npm-stat.com/charts.html?package=node-red-contrib-email)\n\n![node-email-send](https://raw.githubusercontent.com/steineey/node-red-contrib-email/master/examples/node-email-send.png)\n\n## Installation \n\nYou can install by using the *Menu - Manage Palette* option, or running the following command in your Node-RED user directory - typically ~/.node-red\n\n```sh\ncd ~/.node-red\nnpm install --save node-red-contrib-email\n```\n\n## Requirements\n\nNodeJS version \u003e= 6.0.0 \\\nNode-RED \u003e= 2.0.0\n\n## SMTP (Transport) Config Node\n\n-   **host** - is the hostname or ip address to connect to\n-   **port** - is the port to connect to\n-   **secure** – if true the connection will use TLS when connecting to server. If false (the default) then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false\n-   **auth** - authentication 'none' or 'login'\n-   **proxy** - is a proxy URL, for example 'http://proxy-host:1234'\n\n## Send Mail Node Input\n\n-   **from** - The email address of the sender. All email addresses can be plain ‘sender@server.com’ or formatted '“Sender Name” sender@server.com', see Address object for details. Can be overwritten with `msg.email.from`.\n-   **to** - Comma separated list or an array of recipients email addresses that will appear on the To: field. Can be overwritten with `msg.email.to`.\n-   **cc** - Comma separated list or an array of recipients email addresses that will appear on the Cc: field. Can be overwritten with `msg.email.cc`.\n-   **bcc** - Comma separated list or an array of recipients email addresses that will appear on the Bcc: field. Can be overwritten with `msg.email.bcc`.\n-   **subject** - The subject of the email. Can be overwritten with `msg.email.subject`.\n-   **priority** -  Sets message importance headers, either ‘high’, ‘normal’ (default) or ‘low’. Can be overwritten with `msg.email.priority`.\n\n### Message Payload\n\n`msg.payload` can be used for one of the following message versions. Set the node property **payload type** to set the version of your `msg.payload`.\n\n-   **text** - The plaintext version of the message as an Unicode string, Buffer, Stream or an attachment-like object ({path: ‘/var/data/…'}). If you're sending a `msg.payload` of type number or boolean, then it is converted to string.\n-   **html** - The HTML version of the message as an Unicode string, Buffer, Stream or an attachment-like object ({path: ‘http://…'})\n-   **amp** - AMP4EMAIL specific HTML version of the message, same usage as with text and html. See AMP example below for usage or this [blogpost](https://blog.nodemailer.com/2019/12/30/testing-amp4email-with-nodemailer/) for sending and rendering.\n\n### Attachments\n\nSet `msg.email.attachments` as an array of attachment objects (see [Using attachments](https://nodemailer.com/message/attachments/) for details). Attachments can be used for embedding images as well.\n\n```js\nmsg.email = {\n    attachments: [\n        {\n            // utf-8 string as an attachment\n            filename: \"text1.txt\",\n            content: \"hello world!\",\n        },\n        {\n            // binary buffer as an attachment\n            filename: \"text2.txt\",\n            content: new Buffer(\"hello world!\", \"utf-8\"),\n        },\n        {\n            // file on disk as an attachment\n            filename: \"text3.txt\",\n            path: \"/path/to/file.txt\", // stream this file\n        },\n        {\n            // filename and content type is derived from path\n            path: \"/path/to/file.txt\",\n        },\n        {\n            // stream as an attachment\n            filename: \"text4.txt\",\n            content: fs.createReadStream(\"file.txt\"),\n        },\n        {\n            // define custom content type for the attachment\n            filename: \"text.bin\",\n            content: \"hello world!\",\n            contentType: \"text/plain\",\n        },\n        {\n            // use URL as an attachment\n            filename: \"license.txt\",\n            path: \"https://raw.github.com/nodemailer/nodemailer/master/LICENSE\",\n        },\n        {\n            // encoded string as an attachment\n            filename: \"text1.txt\",\n            content: \"aGVsbG8gd29ybGQh\",\n            encoding: \"base64\",\n        },\n        {\n            // data uri as an attachment\n            path: \"data:text/plain;base64,aGVsbG8gd29ybGQ=\",\n        },\n        {\n            // use pregenerated MIME node\n            raw:\n                \"Content-Type: text/plain\\r\\n\" +\n                \"Content-Disposition: attachment;\\r\\n\" +\n                \"\\r\\n\" +\n                \"Hello world!\",\n        },\n    ],\n};\n```\n\n### Overwrite Node Properties\n\nUse the node editor to define the email fields or overwrite this properties with a flow msg:\n\n```js\nmsg.email = {\n    from: \"foo@example.com\",\n    to: \"bar@example.com\",\n    subject: \"Test\",\n    text: \"This is the plain text version.\",\n    html: \"\u003ch1\u003eThis is the html version\u003c/h1\u003e\",\n    attachments: [\n        {\n            // utf-8 string as an attachment\n            filename: \"text1.txt\",\n            content: \"hello world!\",\n        }\n    ],\n};\n```\n\nOnly overwrite email.to:\n```js\nmsg.email = {\n    to: \"receiver@example.com\"\n};\n```\n\nExample for amp message:\n\n```js\nmsg.email = {\n    from: \"Nodemailer \u003cexample@nodemailer.com\u003e\",\n    to: \"Nodemailer \u003cexample@nodemailer.com\u003e\",\n    subject: \"AMP4EMAIL message\",\n    text: \"For clients with plaintext support only\",\n    html: \"\u003cp\u003eFor clients that do not support AMP4EMAIL or amp content is not valid\u003c/p\u003e\",\n    amp: `\u003c!doctype html\u003e\n    \u003chtml ⚡4email\u003e\n      \u003chead\u003e\n        \u003cmeta charset=\"utf-8\"\u003e\n        \u003cstyle amp4email-boilerplate\u003ebody{visibility:hidden}\u003c/style\u003e\n        \u003cscript async src=\"https://cdn.ampproject.org/v0.js\"\u003e\u003c/script\u003e\n        \u003cscript async custom-element=\"amp-anim\" src=\"https://cdn.ampproject.org/v0/amp-anim-0.1.js\"\u003e\u003c/script\u003e\n      \u003c/head\u003e\n      \u003cbody\u003e\n        \u003cp\u003eImage: \u003camp-img src=\"https://cldup.com/P0b1bUmEet.png\" width=\"16\" height=\"16\"/\u003e\u003c/p\u003e\n        \u003cp\u003eGIF (requires \"amp-anim\" script in header):\u003cbr/\u003e\n          \u003camp-anim src=\"https://cldup.com/D72zpdwI-i.gif\" width=\"500\" height=\"350\"/\u003e\u003c/p\u003e\n      \u003c/body\u003e\n    \u003c/html\u003e`,\n};\n```\n\n## Send Mail Node Output\n\noutput `msg.payload` includes the result, the exact format depends on the transport mechanism used\n\n-   `msg.payload.messageId` - most transports should return the final Message-Id value used with this property\n-   `msg.payload.envelope` includes the envelope object for the message\n-   `msg.payload.accepted` is an array returned by SMTP transports (includes recipient addresses that were accepted by the server)\n-   `msg.payload.rejected` is an array returned by SMTP transports (includes recipient addresses that were rejected by the server)\n-   `msg.payload.pending` is an array returned by Direct SMTP transport. Includes recipient addresses that were temporarily rejected together with the server response\n    response is a string returned by SMTP transports and includes the last SMTP response from the server\n\n## Connection Test\n\nSMTP connection is verified at node startup and displayed as node status.\nBe aware though that this call only tests connection and authentication but it does not check if the service allows you to use a specific envelope From address or not.\n\n## More Information\n\nThis node is based on *nodemailer*. Read their documentation for a deeper understanding:\n\n- [smtp configuration](https://nodemailer.com/smtp/)\n- [message configuration](https://nodemailer.com/message/)\n\n## Feature Requests\n\nFeel free to contact me for any feature request.\n\nFeatures not implemented yet:\n\n- OAuth2 authentication\n- Pooled SMTP\n- Delivery status notification\n- Calendar events\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsteinba%2Fnode-red-contrib-email","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsteinba%2Fnode-red-contrib-email","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsteinba%2Fnode-red-contrib-email/lists"}