1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
This commit is contained in:
timolehto 2017-02-21 15:00:21 +02:00 committed by Dave Conway-Jones
parent 6ace40c1f2
commit f15f8598f3

View File

@ -52,22 +52,19 @@ module.exports = function(RED) {
} }
var node = this; var node = this;
var smtpTransport = nodemailer.createTransport({ var smtpOptions = {
host: node.outserver, host: node.outserver,
port: node.outport, port: node.outport,
secure: node.secure, secure: node.secure
auth: {
user: node.userid,
pass: node.password
} }
});
if(this.userid && this.password) { if(this.userid && this.password) {
smtpTransport.auth = { smtpOptions.auth = {
user: node.userid, user: node.userid,
pass: node.password pass: node.password
}; };
} }
var smtpTransport = nodemailer.createTransport(smtpOptions);
this.on("input", function(msg) { this.on("input", function(msg) {
if (msg.hasOwnProperty("payload")) { if (msg.hasOwnProperty("payload")) {