mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
Don't require mail.options to be set
This commit is contained in:
parent
5929336889
commit
5e4db70fd0
@ -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 () {
|
||||
|
Loading…
Reference in New Issue
Block a user