mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
add envelope to email node options
as part of node-red#875
This commit is contained in:
parent
34c42eed61
commit
b23cf0b788
@ -77,6 +77,7 @@
|
||||
The filename should be set using <code>msg.filename</code>. Optionally <code>msg.description</code> can be added for the body text.</p>
|
||||
<p>Alternatively you may provide <code>msg.attachments</code> which should contain an array of one or
|
||||
more attachments in <a href="https://www.npmjs.com/package/nodemailer#attachments" target="_new">nodemailer</a> format.</p>
|
||||
<p>If required by your recipient you may also pass in a <code>msg.envelope</code> object, typically containing extra from and to properties.</p>
|
||||
<p>Note: uses SMTP with SSL to port 465.</p>
|
||||
</script>
|
||||
|
||||
|
@ -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";
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "node-red-node-email",
|
||||
"version" : "0.1.5",
|
||||
"version" : "0.1.6",
|
||||
"description" : "Node-RED nodes to send and receive simple emails",
|
||||
"dependencies" : {
|
||||
"nodemailer" : "1.11.*",
|
||||
|
Loading…
x
Reference in New Issue
Block a user