mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
Merge pull request #2137 from jgillich/patch-1
Don't require mail.options to be set
This commit is contained in:
commit
1783a895de
@ -16,7 +16,7 @@ function GhostMailer(opts) {
|
|||||||
// *This promise should always resolve to avoid halting Ghost::init*.
|
// *This promise should always resolve to avoid halting Ghost::init*.
|
||||||
GhostMailer.prototype.init = function () {
|
GhostMailer.prototype.init = function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
if (config().mail && config().mail.transport && config().mail.options) {
|
if (config().mail && config().mail.transport) {
|
||||||
this.createTransport();
|
this.createTransport();
|
||||||
return when.resolve();
|
return when.resolve();
|
||||||
}
|
}
|
||||||
@ -53,7 +53,7 @@ GhostMailer.prototype.detectSendmail = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
GhostMailer.prototype.createTransport = 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 () {
|
GhostMailer.prototype.usingSendmail = function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user