From a0e744e3f56fca745ce1f4306282af86edfc2402 Mon Sep 17 00:00:00 2001 From: cnouguier Date: Mon, 18 Nov 2024 18:28:56 +0100 Subject: [PATCH] wip: Email service should use an email sender adress instead of the SMTP authentication user #990 --- core/api/hooks/hooks.authentication.js | 2 +- core/api/hooks/hooks.push.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/api/hooks/hooks.authentication.js b/core/api/hooks/hooks.authentication.js index fd4e66067..f2ed7379c 100644 --- a/core/api/hooks/hooks.authentication.js +++ b/core/api/hooks/hooks.authentication.js @@ -17,7 +17,7 @@ export async function verifyGuest (hook) { if (!user) return hook debug('verifyGuest hook called on ', user._id) - // Check whether the user has been inivted. If not, nothing to do + // Check whether the user has been invited. If not, nothing to do if (!user.sponsor) { debug('Logged user is not a guest') return hook diff --git a/core/api/hooks/hooks.push.js b/core/api/hooks/hooks.push.js index ae37561b8..4c3a625ea 100644 --- a/core/api/hooks/hooks.push.js +++ b/core/api/hooks/hooks.push.js @@ -25,12 +25,12 @@ export async function sendNewSubscriptionEmail (hook) { // Data const app = hook.app + console.log(app) const mailerService = app.getService('mailer') const domainPath = app.get('domain') + '/#/' const email = { subject: 'Security alert - new browser detected', 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, domainPath