Skip to content

Commit ec62083

Browse files
committed
wip: Email service should use an email sender adress instead of the SMTP authentication user #990
1 parent 1d1d91a commit ec62083

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/api/hooks/hooks.push.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export async function sendNewSubscriptionEmail (hook) {
2929
const domainPath = app.get('domain') + '/#/'
3030
const email = {
3131
subject: 'Security alert - new browser detected',
32-
from: mailerService.options.auth.user,
32+
from: mailerService.options.from || mailerService.options.auth.user,
3333
// When changing email send to the new one so that it can be verified
3434
to: updatedUser.email,
3535
link: domainPath,

core/api/services/account/account.service.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function (name, app, options) {
4242
const mailerService = app.getService('mailer')
4343
const domainPath = app.get('domain') + '/#/'
4444
const email = {
45-
from: mailerService.options.auth.user,
45+
from: mailerService.options.from || mailerService.options.auth.user,
4646
// When changing email send to the new one so that it can be verified
4747
to: (type === 'identityChange' ? user.verifyChanges.email : user.email),
4848
domainPath

0 commit comments

Comments
 (0)