From d4bd2bca282523e592d7c4fe71fe5e8a00d68475 Mon Sep 17 00:00:00 2001 From: britztopher Date: Thu, 14 Aug 2014 12:07:44 -0400 Subject: [PATCH] adding the ability to use single or multiple email transports in datasources.json file --- lib/connectors/mail.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/connectors/mail.js b/lib/connectors/mail.js index 883ecec4..b4542244 100644 --- a/lib/connectors/mail.js +++ b/lib/connectors/mail.js @@ -19,7 +19,15 @@ module.exports = MailConnector; function MailConnector(settings) { assert(typeof settings === 'object', 'cannot initialize MailConnector without a settings object'); - var transports = settings.transports || [settings.transport] || []; + + if(!settings.transport){ + settings.transport = []; + }else{ + settings.transport = [settings.transport]; + } + + var transports = settings.transports || settings.transport; + this.transportsIndex = {}; this.transports = [];