From 161afbf3c48a372ab0940b0f0b54576ac0adcf62 Mon Sep 17 00:00:00 2001 From: John O'Nolan Date: Thu, 6 Mar 2014 12:03:00 +0100 Subject: [PATCH] Update system emails to come from ghost@blog.url Closes #2145 --- core/server/mail.js | 4 ++-- core/test/unit/mail_spec.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/server/mail.js b/core/server/mail.js index 347720a9a2..3aa37c7cb6 100644 --- a/core/server/mail.js +++ b/core/server/mail.js @@ -90,8 +90,8 @@ GhostMailer.prototype.fromAddress = function () { domain = config().url.match(new RegExp("^https?://([^/:?#]+)(?:[/:?#]|$)", "i")); domain = domain && domain[1]; - // Default to webmaster@[blog.url] - from = 'webmaster@' + domain; + // Default to ghost@[blog.url] + from = 'ghost@' + domain; } return from; diff --git a/core/test/unit/mail_spec.js b/core/test/unit/mail_spec.js index e815fb3faa..f60ae8cc68 100644 --- a/core/test/unit/mail_spec.js +++ b/core/test/unit/mail_spec.js @@ -174,18 +174,18 @@ describe("Mail", function () { done(); }); - it('should fall back to webmaster@[blog.url] as from address', function (done) { + it('should fall back to ghost@[blog.url] as from address', function (done) { // Standard domain overrideConfig({url: 'http://default.com', mail:{fromaddress: null}}); - mailer.fromAddress().should.equal('webmaster@default.com'); + mailer.fromAddress().should.equal('ghost@default.com'); // Trailing slash overrideConfig({url: 'http://default.com/', mail:{}}); - mailer.fromAddress().should.equal('webmaster@default.com'); + mailer.fromAddress().should.equal('ghost@default.com'); // Strip Port overrideConfig({url: 'http://default.com:2368/', mail:{}}); - mailer.fromAddress().should.equal('webmaster@default.com'); + mailer.fromAddress().should.equal('ghost@default.com'); done(); });