Update system emails to come from ghost@blog.url

Closes #2145
This commit is contained in:
John O'Nolan 2014-03-06 12:03:00 +01:00
parent 75caeb9341
commit 161afbf3c4
2 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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();
});