Don't require mail.options to be set

This commit is contained in:
Jakob Gillich 2014-02-07 11:17:22 +01:00
parent 5929336889
commit 5e4db70fd0

View File

@ -16,7 +16,7 @@ function GhostMailer(opts) {
// *This promise should always resolve to avoid halting Ghost::init*.
GhostMailer.prototype.init = function () {
var self = this;
if (config().mail && config().mail.transport && config().mail.options) {
if (config().mail && config().mail.transport) {
this.createTransport();
return when.resolve();
}
@ -53,7 +53,7 @@ GhostMailer.prototype.detectSendmail = function () {
};
GhostMailer.prototype.createTransport = function () {
this.transport = nodemailer.createTransport(config().mail.transport, _.clone(config().mail.options));
this.transport = nodemailer.createTransport(config().mail.transport, _.clone(config().mail.options) || {});
};
GhostMailer.prototype.usingSendmail = function () {