Merge pull request #375 from strongloop/feature/upgrade-to-nodemailer-1.x
Upgrade to nodemailer 1.0.1
This commit is contained in:
commit
0dae813d5f
|
@ -58,7 +58,12 @@ MailConnector.prototype.setupTransport = function(setting) {
|
|||
var connector = this;
|
||||
connector.transports = connector.transports || [];
|
||||
connector.transportsIndex = connector.transportsIndex || {};
|
||||
var transport = mailer.createTransport(setting.type, setting);
|
||||
|
||||
var transportModuleName = 'nodemailer-' + (setting.type || 'STUB').toLowerCase() + '-transport';
|
||||
var transportModule = require(transportModuleName);
|
||||
|
||||
var transport = mailer.createTransport(transportModule(setting));
|
||||
|
||||
connector.transportsIndex[setting.type] = transport;
|
||||
connector.transports.push(transport);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,8 @@
|
|||
"bcryptjs": "~2.0.1",
|
||||
"debug": "~1.0.4",
|
||||
"inflection": "~1.3.8",
|
||||
"nodemailer": "~0.7.1",
|
||||
"nodemailer": "~1.0.1",
|
||||
"nodemailer-stub-transport": "~0.1.4",
|
||||
"uid2": "0.0.3",
|
||||
"underscore": "~1.6.0",
|
||||
"underscore.string": "~2.3.3"
|
||||
|
|
|
@ -24,7 +24,8 @@ describe('Email and SMTP', function () {
|
|||
};
|
||||
|
||||
MyEmail.send(options, function(err, mail) {
|
||||
assert(mail.message);
|
||||
assert(!err);
|
||||
assert(mail.response);
|
||||
assert(mail.envelope);
|
||||
assert(mail.messageId);
|
||||
done(err);
|
||||
|
@ -41,7 +42,7 @@ describe('Email and SMTP', function () {
|
|||
});
|
||||
|
||||
message.send(function (err, mail) {
|
||||
assert(mail.message);
|
||||
assert(mail.response);
|
||||
assert(mail.envelope);
|
||||
assert(mail.messageId);
|
||||
done(err);
|
||||
|
|
|
@ -443,11 +443,11 @@ describe('User', function(){
|
|||
|
||||
user.verify(options, function (err, result) {
|
||||
assert(result.email);
|
||||
assert(result.email.message);
|
||||
assert(result.email.response);
|
||||
assert(result.token);
|
||||
|
||||
|
||||
assert(~result.email.message.indexOf('To: bar@bat.com'));
|
||||
assert(~result.email.response.toString('utf-8').indexOf('To: bar@bat.com'));
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue