From ca8b77182c264f3c963d07673e2997b83b6d61f7 Mon Sep 17 00:00:00 2001 From: Rish Date: Wed, 26 Aug 2020 13:30:16 +0530 Subject: [PATCH] Updated sender address for member auth emails to support address no issue - Member auth emails were previously using the `from` address as sender - New `members_support_address` was introduced with default as original "from" address - Auth emails use the new support address as sender --- core/server/services/members/api.js | 2 +- core/server/services/members/config.js | 5 +++++ core/server/services/members/settings.js | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/server/services/members/api.js b/core/server/services/members/api.js index bac0490a14..8b7878d4d3 100644 --- a/core/server/services/members/api.js +++ b/core/server/services/members/api.js @@ -26,7 +26,7 @@ function createApiInstance(config) { logging.warn(message.text); } let msg = Object.assign({ - from: config.getEmailFromAddress(), + from: config.getAuthEmailFromAddress(), subject: 'Signin', forceTextContent: true }, message); diff --git a/core/server/services/members/config.js b/core/server/services/members/config.js index 0797f14d7b..59ad2e4630 100644 --- a/core/server/services/members/config.js +++ b/core/server/services/members/config.js @@ -44,6 +44,11 @@ class MembersConfigProvider { return fromAddress; } + getAuthEmailFromAddress() { + const supportAddress = this._settingsCache.get('members_support_address'); + return supportAddress || this.getEmailFromAddress(); + } + getPublicPlans() { const CURRENCY_SYMBOLS = { USD: '$', diff --git a/core/server/services/members/settings.js b/core/server/services/members/settings.js index 5a4b5156ac..771dcfcc91 100644 --- a/core/server/services/members/settings.js +++ b/core/server/services/members/settings.js @@ -17,7 +17,7 @@ function createSettingsInstance(config) { logging.warn(message.text); } let msg = Object.assign({ - from: config.getEmailFromAddress(), + from: config.getAuthEmailFromAddress(), subject: 'Update email address', forceTextContent: true }, message);