From 367237d94647ea1b4b4ccc8c7f546d1481755669 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Mon, 13 Feb 2017 22:43:43 +0000 Subject: [PATCH] Let email out node set secure connection explicitly to close #1148 --- social/email/61-email.html | 6 +++++- social/email/61-email.js | 3 ++- social/email/package.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/social/email/61-email.html b/social/email/61-email.html index fa233370..9850bcea 100644 --- a/social/email/61-email.html +++ b/social/email/61-email.html @@ -35,7 +35,10 @@
- + + + + Use secure connection.
@@ -77,6 +80,7 @@ defaults: { server: {value:"smtp.gmail.com",required:true}, port: {value:"465",required:true}, + secure: {value: true}, name: {value:""}, dname: {value:""} }, diff --git a/social/email/61-email.js b/social/email/61-email.js index e0714f40..dc655a85 100644 --- a/social/email/61-email.js +++ b/social/email/61-email.js @@ -29,6 +29,7 @@ module.exports = function(RED) { this.name = n.name; this.outserver = n.server; this.outport = n.port; + this.secure = n.secure; var flag = false; if (this.credentials && this.credentials.hasOwnProperty("userid")) { this.userid = this.credentials.userid; @@ -58,7 +59,7 @@ module.exports = function(RED) { var smtpTransport = nodemailer.createTransport({ host: node.outserver, port: node.outport, - secure: node.useSSL, + secure: node.secure, auth: { user: node.userid, pass: node.password diff --git a/social/email/package.json b/social/email/package.json index eb78bad0..95a3ab95 100644 --- a/social/email/package.json +++ b/social/email/package.json @@ -1,6 +1,6 @@ { "name": "node-red-node-email", - "version": "0.1.16", + "version": "0.1.17", "description": "Node-RED nodes to send and receive simple emails", "dependencies": { "nodemailer": "^1.11.0",