From ec62083ea3a031282575baad6c5584c7106f4a65 Mon Sep 17 00:00:00 2001 From: cnouguier Date: Mon, 18 Nov 2024 17:34:02 +0100 Subject: [PATCH] wip: Email service should use an email sender adress instead of the SMTP authentication user #990 --- core/api/hooks/hooks.push.js | 2 +- core/api/services/account/account.service.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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