From 83fc62c0afa476a6812573b3291ddd83ffa1fb11 Mon Sep 17 00:00:00 2001 From: Dimitris Date: Fri, 25 Aug 2017 18:05:02 +0300 Subject: [PATCH] Update nodemailer to v4.x --- lib/connectors/mail.js | 4 +--- package.json | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/connectors/mail.js b/lib/connectors/mail.js index 411a361a..05faf3d8 100644 --- a/lib/connectors/mail.js +++ b/lib/connectors/mail.js @@ -80,9 +80,7 @@ MailConnector.prototype.setupTransport = function(setting) { var transport; var transportType = (setting.type || 'STUB').toLowerCase(); - if (transportType === 'direct') { - transport = mailer.createTransport(); - } else if (transportType === 'smtp') { + if (transportType === 'smtp') { transport = mailer.createTransport(setting); } else { var transportModuleName = 'nodemailer-' + transportType + '-transport'; diff --git a/package.json b/package.json index af4b3d38..84538b24 100644 --- a/package.json +++ b/package.json @@ -52,8 +52,9 @@ "loopback-datasource-juggler": "^3.18.0", "loopback-filters": "^1.0.0", "loopback-phase": "^3.0.0", - "nodemailer": "^2.5.0", - "nodemailer-stub-transport": "^1.0.0", + "nodemailer": "^4.0.1", + "nodemailer-direct-transport": "^3.3.2", + "nodemailer-stub-transport": "^1.1.0", "serve-favicon": "^2.2.0", "stable": "^0.1.5", "strong-globalize": "^3.1.0",