diff --git a/backend/src/middleware/email/emailMiddleware.js b/backend/src/middleware/email/emailMiddleware.js index 7bfd174dc..809ca4072 100644 --- a/backend/src/middleware/email/emailMiddleware.js +++ b/backend/src/middleware/email/emailMiddleware.js @@ -5,8 +5,11 @@ import { signupTemplate } from './templates/signup' let sendMail if (CONFIG.SMTP_HOST && CONFIG.SMTP_PORT) { - sendMail = async template => { - await transporter().sendMail(template) + sendMail = async templateArgs => { + await transporter().sendMail({ + from: '"Human Connection" ', + ...templateArgs, + }) } } else { sendMail = () => {} diff --git a/backend/src/middleware/email/templates/passwordReset.js b/backend/src/middleware/email/templates/passwordReset.js index 9f6d3eff2..c977594b5 100644 --- a/backend/src/middleware/email/templates/passwordReset.js +++ b/backend/src/middleware/email/templates/passwordReset.js @@ -1,7 +1,5 @@ import CONFIG from '../../../config' -export const from = '"Human Connection" ' - export const resetPasswordMail = options => { const { name, diff --git a/backend/src/middleware/email/templates/signup.js b/backend/src/middleware/email/templates/signup.js index 922be425d..b7d2d4570 100644 --- a/backend/src/middleware/email/templates/signup.js +++ b/backend/src/middleware/email/templates/signup.js @@ -1,12 +1,10 @@ import CONFIG from '../../../config' -export const from = '"Human Connection" ' - export const signupTemplate = options => { const { email, nonce, - subject = 'Signup link', + subject = 'Welcome to Human Connection! Here is your signup link.', supportUrl = 'https://human-connection.org/en/contact/', } = options const actionUrl = new URL('/registration/create-user-account', CONFIG.CLIENT_URI)