add envelope to email node options

as part of node-red#875
This commit is contained in:
Dave Conway-Jones
2016-05-19 10:13:47 +01:00
parent 34c42eed61
commit b23cf0b788
3 changed files with 8 additions and 6 deletions

View File

@@ -89,6 +89,7 @@ module.exports = function(RED) {
var sendopts = { from: node.userid }; // sender address
sendopts.to = node.name || msg.to; // comma separated list of addressees
sendopts.subject = msg.topic || msg.title || "Message from Node-RED"; // subject line
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) {
var fe = "bin";