added the ability to use an array of transports or just a single trnasport
This commit is contained in:
parent
d82d789ffa
commit
56fe548a46
|
@ -19,9 +19,9 @@ module.exports = MailConnector;
|
|||
|
||||
function MailConnector(settings) {
|
||||
assert(typeof settings === 'object', 'cannot initialize MailConnector without a settings object');
|
||||
var transports = settings.transports || [];
|
||||
var transports = settings.transports || [settings.transport] || [];
|
||||
this.transportsIndex = {};
|
||||
this.transports = [];
|
||||
this.transports = [];
|
||||
|
||||
if(loopback.isServer) {
|
||||
transports.forEach(this.setupTransport.bind(this));
|
||||
|
|
Loading…
Reference in New Issue