Skip to content
This repository has been archived by the owner on Aug 24, 2019. It is now read-only.

Commit

Permalink
Fixes smtp/auth bug: node-red#279
Browse files Browse the repository at this point in the history
  • Loading branch information
timolehto committed Feb 21, 2017
1 parent 80942c5 commit afa1308
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions social/email/61-email.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ module.exports = function(RED) {
}
var node = this;

var smtpTransport = nodemailer.createTransport({
var smtpOptions = {
host: node.outserver,
port: node.outport,
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")) {
Expand Down

0 comments on commit afa1308

Please sign in to comment.