diff --git a/core/api/hooks/hooks.push.js b/core/api/hooks/hooks.push.js index 10d90ca74..ae37561b8 100644 --- a/core/api/hooks/hooks.push.js +++ b/core/api/hooks/hooks.push.js @@ -29,7 +29,7 @@ export async function sendNewSubscriptionEmail (hook) { const domainPath = app.get('domain') + '/#/' const email = { subject: 'Security alert - new browser detected', - from: mailerService.options.auth.user, + from: mailerService.options.from || mailerService.options.auth.user, // When changing email send to the new one so that it can be verified to: updatedUser.email, link: domainPath, diff --git a/core/api/services/account/account.service.js b/core/api/services/account/account.service.js index b5e02001b..ee7e5f2e5 100644 --- a/core/api/services/account/account.service.js +++ b/core/api/services/account/account.service.js @@ -42,7 +42,7 @@ export default function (name, app, options) { const mailerService = app.getService('mailer') const domainPath = app.get('domain') + '/#/' const email = { - from: mailerService.options.auth.user, + from: mailerService.options.from || mailerService.options.auth.user, // When changing email send to the new one so that it can be verified to: (type === 'identityChange' ? user.verifyChanges.email : user.email), domainPath