adding the ability to use single or multiple email transports in datasources.json file

This commit is contained in:
britztopher 2014-08-14 12:07:44 -04:00
parent 56fe548a46
commit d4bd2bca28
1 changed files with 9 additions and 1 deletions

View File

@ -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 = [];