Removed from-address fallback to members_from_address setting

refs https://github.com/TryGhost/Team/issues/1558

- `members_from_address` is no longer configurable in Admin but was still used as a fallback
- This change removes the fallback so we default straight to noreply@<domain> when a from-address isn't set for a newsletter
This commit is contained in:
Matt Hanley 2022-05-04 10:22:19 +01:00 committed by Matt Hanley
parent 45695ef2d5
commit 00e6f4bb34

View File

@ -35,13 +35,8 @@ class MembersConfigProvider {
}
getEmailFromAddress() {
const fromAddress = this._settingsCache.get('members_from_address') || 'noreply';
// Any fromAddress without domain uses site domain, like default setting `noreply`
if (fromAddress.indexOf('@') < 0) {
return `${fromAddress}@${this._getDomain()}`;
}
return fromAddress;
// Individual from addresses are set per newsletter - this is the fallback address
return `noreply@${this._getDomain()}`;
}
getEmailSupportAddress() {