mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Fixes smtp/auth bug: https://github.com/node-red/node-red-nodes/issues/279 (#280)
This commit is contained in:
parent
6ace40c1f2
commit
f15f8598f3
@ -52,22 +52,19 @@ module.exports = function(RED) {
|
||||
}
|
||||
var node = this;
|
||||
|
||||
var smtpTransport = nodemailer.createTransport({
|
||||
var smtpOptions = {
|
||||
host: node.outserver,
|
||||
port: node.outport,
|
||||
secure: node.secure,
|
||||
auth: {
|
||||
user: node.userid,
|
||||
pass: node.password
|
||||
}
|
||||
});
|
||||
secure: node.secure
|
||||
}
|
||||
|
||||
if(this.userid && this.password) {
|
||||
smtpTransport.auth = {
|
||||
smtpOptions.auth = {
|
||||
user: node.userid,
|
||||
pass: node.password
|
||||
};
|
||||
}
|
||||
var smtpTransport = nodemailer.createTransport(smtpOptions);
|
||||
|
||||
this.on("input", function(msg) {
|
||||
if (msg.hasOwnProperty("payload")) {
|
||||
|
Loading…
Reference in New Issue
Block a user