mirror of
				https://github.com/node-red/node-red-nodes.git
				synced 2025-03-01 10:37:43 +00:00 
			
		
		
		
	Let email node be able to send blank topic
and let msg.description be " also to close #959
This commit is contained in:
		| @@ -98,7 +98,8 @@ module.exports = function(RED) { | ||||
|                         sendopts.headers = msg.headers; | ||||
|                         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")) { | ||||
|                         sendopts.inReplyTo = msg.header["message-id"]; | ||||
|                         sendopts.subject = "Re: " + sendopts.subject; | ||||
| @@ -119,7 +120,8 @@ module.exports = function(RED) { | ||||
|                             sendopts.attachments[0].contentType = msg.headers["content-type"]; | ||||
|                         } | ||||
|                         // 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 { | ||||
|                         var payload = RED.util.ensureString(msg.payload); | ||||
|   | ||||
| @@ -36,7 +36,7 @@ | ||||
|             "always": "immer", | ||||
|             "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": { | ||||
|             "cred": "<b>Hinweis</b>: Berechtigungen von globaler emailkeys.js-Datei kopiert", | ||||
|             "recent": "Tipp: Es wird nur die letzte E-Mail abgerufen", | ||||
|   | ||||
| @@ -42,10 +42,10 @@ | ||||
|             "keyFile":"Private key", | ||||
|             "users": "Users", | ||||
|             "auth": "Authenticate users", | ||||
|             "addButton": "Add",    | ||||
|             "addButton": "Add", | ||||
|             "expert": "Expert" | ||||
|         }, | ||||
|         "default-message": "__description__\n\nFile from Node-RED is attached: __filename__", | ||||
|         "default-message": "\nFile from Node-RED is attached: __filename__", | ||||
|         "tip": { | ||||
|             "cred": "<b>Note:</b> Copied credentials from global emailkeys.js file.", | ||||
|             "recent": "Tip: Only retrieves the single most recent email.", | ||||
|   | ||||
| @@ -36,7 +36,7 @@ | ||||
|             "always": "常時", | ||||
|             "rejectUnauthorised": "チェックサーバ証明書は有効です" | ||||
|         }, | ||||
|         "default-message": "__description__\n\nNode-REDからファイルが添付されました: __filename__", | ||||
|         "default-message": "\nNode-REDからファイルが添付されました: __filename__", | ||||
|         "tip": { | ||||
|             "cred": "<b>注釈:</b> emailkeys.jsファイルから認証情報をコピーしました。", | ||||
|             "recent": "注釈: 最新のメールを1件のみ取得します。", | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "node-red-node-email", | ||||
|   "version": "1.18.1", | ||||
|   "version": "1.18.2", | ||||
|   "description": "Node-RED nodes to send and receive simple emails.", | ||||
|   "dependencies": { | ||||
|     "imap": "^0.8.19", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user