From b193e180c5d9d70c8d9e9aa5f927493026cb8458 Mon Sep 17 00:00:00 2001 From: Alina Beck Date: Thu, 19 Sep 2019 00:42:42 +0100 Subject: [PATCH] add wrong account html template --- .../email/templates/passwordReset.js | 26 +- .../email/templates/resetPassword.html | 4 +- .../email/templates/wrongAccount.html | 448 ++++++++++++++++++ 3 files changed, 452 insertions(+), 26 deletions(-) create mode 100644 backend/src/middleware/email/templates/wrongAccount.html diff --git a/backend/src/middleware/email/templates/passwordReset.js b/backend/src/middleware/email/templates/passwordReset.js index 03f697200..0b57fc9d5 100644 --- a/backend/src/middleware/email/templates/passwordReset.js +++ b/backend/src/middleware/email/templates/passwordReset.js @@ -4,6 +4,7 @@ import mustache from 'mustache' import CONFIG from '../../../config' const passwordResetHtml = fs.readFileSync(path.join(__dirname, './resetPassword.html'), 'utf-8') +const wrongAccountHtml = fs.readFileSync(path.join(__dirname, './wrongAccount.html'), 'utf-8') export const resetPasswordMail = ({ name, @@ -35,29 +36,6 @@ export const wrongAccountMail = options => { from: '"Human Connection" ', to: email, subject, - text: ` -We received a request to reset the password to access Human Connection with your -email address, but we were unable to find an account associated with this -address. - -If you use Human Connection and were expecting this email, consider trying to -request a password reset using the email address associated with your account. -Try a different email: - -${actionUrl} - -If you do not use Human Connection or did not request a password reset, please -ignore this email. Feel free to contact support if you have further questions: - -${supportUrl} - -Thanks, -The Human Connection Team - -Human Connection gemeinnützige GmbH -Bahnhofstr. 11 -73235 Weilheim / Teck -Deutschland - `, + html: mustache.render(wrongAccountHtml, { actionUrl, supportUrl }), } } diff --git a/backend/src/middleware/email/templates/resetPassword.html b/backend/src/middleware/email/templates/resetPassword.html index 162078c73..1b12702b4 100644 --- a/backend/src/middleware/email/templates/resetPassword.html +++ b/backend/src/middleware/email/templates/resetPassword.html @@ -8,7 +8,7 @@ - Reset Password / Neues Passwort + Reset Password | Neues Passwort + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + +