mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Let email node be able to send blank topic
and let msg.description be " also to close #959
This commit is contained in:
parent
4c0ecc70bc
commit
c3a5716fe7
@ -98,7 +98,8 @@ module.exports = function(RED) {
|
|||||||
sendopts.headers = msg.headers;
|
sendopts.headers = msg.headers;
|
||||||
sendopts.priority = msg.priority;
|
sendopts.priority = msg.priority;
|
||||||
}
|
}
|
||||||
sendopts.subject = msg.topic || msg.title || "Message from Node-RED"; // subject line
|
if (msg.hasOwnProperty("topic") && msg.topic === '') { sendopts.subject = ""; }
|
||||||
|
else { sendopts.subject = msg.topic || msg.title || "Message from Node-RED"; } // subject line
|
||||||
if (msg.hasOwnProperty("header") && msg.header.hasOwnProperty("message-id")) {
|
if (msg.hasOwnProperty("header") && msg.header.hasOwnProperty("message-id")) {
|
||||||
sendopts.inReplyTo = msg.header["message-id"];
|
sendopts.inReplyTo = msg.header["message-id"];
|
||||||
sendopts.subject = "Re: " + sendopts.subject;
|
sendopts.subject = "Re: " + sendopts.subject;
|
||||||
@ -119,7 +120,8 @@ module.exports = function(RED) {
|
|||||||
sendopts.attachments[0].contentType = msg.headers["content-type"];
|
sendopts.attachments[0].contentType = msg.headers["content-type"];
|
||||||
}
|
}
|
||||||
// Create some body text..
|
// Create some body text..
|
||||||
sendopts.text = RED._("email.default-message",{filename:fname, description:(msg.description||"")});
|
if (msg.hasOwnProperty("description")) { sendopts.text = msg.description; }
|
||||||
|
else { sendopts.text = RED._("email.default-message",{filename:fname}); }
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var payload = RED.util.ensureString(msg.payload);
|
var payload = RED.util.ensureString(msg.payload);
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
"always": "immer",
|
"always": "immer",
|
||||||
"rejectUnauthorised": "Überprüfen sie, ob das serverzertifikat gültig ist"
|
"rejectUnauthorised": "Überprüfen sie, ob das serverzertifikat gültig ist"
|
||||||
},
|
},
|
||||||
"default-message": "__description__\n\nDatei von Node-RED ist angehängt: __filename__",
|
"default-message": "\nDatei von Node-RED ist angehängt: __filename__",
|
||||||
"tip": {
|
"tip": {
|
||||||
"cred": "<b>Hinweis</b>: Berechtigungen von globaler emailkeys.js-Datei kopiert",
|
"cred": "<b>Hinweis</b>: Berechtigungen von globaler emailkeys.js-Datei kopiert",
|
||||||
"recent": "Tipp: Es wird nur die letzte E-Mail abgerufen",
|
"recent": "Tipp: Es wird nur die letzte E-Mail abgerufen",
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
"addButton": "Add",
|
"addButton": "Add",
|
||||||
"expert": "Expert"
|
"expert": "Expert"
|
||||||
},
|
},
|
||||||
"default-message": "__description__\n\nFile from Node-RED is attached: __filename__",
|
"default-message": "\nFile from Node-RED is attached: __filename__",
|
||||||
"tip": {
|
"tip": {
|
||||||
"cred": "<b>Note:</b> Copied credentials from global emailkeys.js file.",
|
"cred": "<b>Note:</b> Copied credentials from global emailkeys.js file.",
|
||||||
"recent": "Tip: Only retrieves the single most recent email.",
|
"recent": "Tip: Only retrieves the single most recent email.",
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
"always": "常時",
|
"always": "常時",
|
||||||
"rejectUnauthorised": "チェックサーバ証明書は有効です"
|
"rejectUnauthorised": "チェックサーバ証明書は有効です"
|
||||||
},
|
},
|
||||||
"default-message": "__description__\n\nNode-REDからファイルが添付されました: __filename__",
|
"default-message": "\nNode-REDからファイルが添付されました: __filename__",
|
||||||
"tip": {
|
"tip": {
|
||||||
"cred": "<b>注釈:</b> emailkeys.jsファイルから認証情報をコピーしました。",
|
"cred": "<b>注釈:</b> emailkeys.jsファイルから認証情報をコピーしました。",
|
||||||
"recent": "注釈: 最新のメールを1件のみ取得します。",
|
"recent": "注釈: 最新のメールを1件のみ取得します。",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red-node-email",
|
"name": "node-red-node-email",
|
||||||
"version": "1.18.1",
|
"version": "1.18.2",
|
||||||
"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…
x
Reference in New Issue
Block a user