0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Allowed localhost email for Ghost Mailer "from" address (#11476)

no issue

Allow localhost mails to bypass validator email check and assign blog title as email name when missing
This commit is contained in:
Rishabh Garg 2020-01-13 12:58:53 +05:30 committed by GitHub
parent caabdad7ad
commit 1e5f7852e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,7 @@ function getFromAddress(requestedFromAddress) {
}
// If we do have a from address, and it's just an email
if (validator.isEmail(address)) {
if (validator.isEmail(address, {require_tld: false})) {
const defaultBlogTitle = settingsCache.get('title') ? settingsCache.get('title').replace(/"/g, '\\"') : common.i18n.t('common.mail.title', {domain: getDomain()});
return `"${defaultBlogTitle}" <${address}>`;
}