fix email inreplyto to do the sensible thing

This commit is contained in:
Dave Conway-Jones 2022-03-19 10:31:40 +00:00
parent 637890309a
commit fb9c90f68c
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
2 changed files with 5 additions and 1 deletions

View File

@ -96,6 +96,10 @@ module.exports = function(RED) {
sendopts.priority = msg.priority;
}
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 (Buffer.isBuffer(msg.payload)) { // if it's a buffer in the payload then auto create an attachment instead
if (!msg.filename) {

View File

@ -1,6 +1,6 @@
{
"name": "node-red-node-email",
"version": "1.14.1",
"version": "1.15.0",
"description": "Node-RED nodes to send and receive simple emails.",
"dependencies": {
"imap": "^0.8.19",