fix email inreplyto to do the sensible thing
This commit is contained in:
parent
637890309a
commit
fb9c90f68c
|
@ -96,6 +96,10 @@ module.exports = function(RED) {
|
||||||
sendopts.priority = msg.priority;
|
sendopts.priority = msg.priority;
|
||||||
}
|
}
|
||||||
sendopts.subject = msg.topic || msg.title || "Message from Node-RED"; // subject line
|
sendopts.subject = msg.topic || msg.title || "Message from Node-RED"; // subject line
|
||||||
|
if (msg.hasOwnProperty("header") && msg.header.hasOwnProperty("message-id")) {
|
||||||
|
sendopts.inReplyTo = msg.header["message-id"];
|
||||||
|
sendopts.subject = "Re: " + sendopts.subject;
|
||||||
|
}
|
||||||
if (msg.hasOwnProperty("envelope")) { sendopts.envelope = msg.envelope; }
|
if (msg.hasOwnProperty("envelope")) { sendopts.envelope = msg.envelope; }
|
||||||
if (Buffer.isBuffer(msg.payload)) { // if it's a buffer in the payload then auto create an attachment instead
|
if (Buffer.isBuffer(msg.payload)) { // if it's a buffer in the payload then auto create an attachment instead
|
||||||
if (!msg.filename) {
|
if (!msg.filename) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "node-red-node-email",
|
"name": "node-red-node-email",
|
||||||
"version": "1.14.1",
|
"version": "1.15.0",
|
||||||
"description": "Node-RED nodes to send and receive simple emails.",
|
"description": "Node-RED nodes to send and receive simple emails.",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"imap": "^0.8.19",
|
"imap": "^0.8.19",
|
||||||
|
|
Loading…
Reference in New Issue