diff --git a/src/mail_templates/new_login_location-html.ejs b/src/mail_templates/new_login_location-html.ejs index ff4a2147c..89bfd484b 100644 --- a/src/mail_templates/new_login_location-html.ejs +++ b/src/mail_templates/new_login_location-html.ejs @@ -2,15 +2,15 @@ -

We've noticed a new login on your Cloudron account.

+

{{ newLoginEmail.topic }}

-

Hi <%= user %>,

+

{{ newLoginEmail.salutation }}

-

We noticed a login on your Cloudron account from a new device.

+

{{ newLoginEmail.notice }}

IP: <%= ip %> (<%= city %>, <%= country %>)

Browser: <%= userAgent %>

-

If this was you, you can safely disregard this email. If this wasn't you, you should change your password immediately.

+

{{ newLoginEmail.action }}



diff --git a/src/mail_templates/new_login_location-text.ejs b/src/mail_templates/new_login_location-text.ejs index 34f3746c9..7e75b44be 100644 --- a/src/mail_templates/new_login_location-text.ejs +++ b/src/mail_templates/new_login_location-text.ejs @@ -1,14 +1,14 @@ -We've noticed a new login on your Cloudron account. +{{ newLoginEmail.topic }} -Hi <%= user %>, +{{ newLoginEmail.salutation }} -We noticed a login on your Cloudron account from a new device. +{{ newLoginEmail.notice }} IP: <%= ip %> (<%= city %>, <%= country %>) Browser: <%= userAgent %> -If this was you, you can safely disregard this email. If this wasn't you, you should change your password immediately. +{{ newLoginEmail.action }} Powered by https://cloudron.io diff --git a/src/mailer.js b/src/mailer.js index c53a99681..f83b03fea 100644 --- a/src/mailer.js +++ b/src/mailer.js @@ -170,7 +170,7 @@ function sendNewLoginLocation(user, loginLocation) { const mailOptions = { from: mailConfig.notificationFrom, to: user.fallbackEmail, - subject: `[${mailConfig.cloudronName}] New login on your account`, + subject: ejs.render(translation.translate('{{ newLoginEmail.subject }}', translationAssets.translations || {}, translationAssets.fallback || {}), { cloudron: mailConfig.cloudronName }), text: render('new_login_location-text.ejs', templateData, translationAssets), html: render('new_login_location-html.ejs', templateData, translationAssets) };