diff --git a/src/mail_templates/welcome_user-html.ejs b/src/mail_templates/welcome_user-html.ejs index 47bfb18a2..5e3ef0e53 100644 --- a/src/mail_templates/welcome_user-html.ejs +++ b/src/mail_templates/welcome_user-html.ejs @@ -2,28 +2,27 @@ -

Hi <%= user.displayName || user.username || user.email %>,

- +

{{ welcomeEmail.salutation }}

{{ welcomeEmail.welcomeTo }}

- Get started. + {{ welcomeEmail.inviteLinkAction }}



- <% if (invitor && invitor.email) { %> - You are receiving this email because you were invited by <%= invitor.email %>. - <% } %> +<% if (invitor) { -%> + {{ welcomeEmail.invitor }} +<% } -%> -
+
- Please note that the invite link will expire in 7 days. -
+ {{ welcomeEmail.expireNote }} +
- Powered by Cloudron + Powered by Cloudron
diff --git a/src/mail_templates/welcome_user-text.ejs b/src/mail_templates/welcome_user-text.ejs index a0f8aa73a..ca18b827c 100644 --- a/src/mail_templates/welcome_user-text.ejs +++ b/src/mail_templates/welcome_user-text.ejs @@ -1,14 +1,13 @@ -Dear <%= user.displayName || user.username || user.email %>, +{{ welcomeEmail.salutation }} -Welcome to <%= cloudronName %>! +{{ welcomeEmail.welcomeTo }} -Follow the link to get started. -<%- inviteLink %> +{{ welcomeEmail.inviteLinkActionText }} -<% if (invitor && invitor.email) { %> -You are receiving this email because you were invited by <%= invitor.email %>. +<% if (invitor) { %> +{{ welcomeEmail.invitor }} <% } %> -Please note that the invite link will expire in 7 days. +{{ welcomeEmail.expireNote }} Powered by https://cloudron.io diff --git a/src/mailer.js b/src/mailer.js index d39a55585..38b508098 100644 --- a/src/mailer.js +++ b/src/mailer.js @@ -147,10 +147,10 @@ function sendInvite(user, invitor, inviteLink) { if (error) return debug('Error getting translations:', error); var templateData = { - user: user, + user: user.displayName || user.username || user.email, webadminUrl: settings.adminOrigin(), inviteLink: inviteLink, - invitor: invitor, + invitor: invitor ? invitor.email : null, cloudronName: mailConfig.cloudronName, cloudronAvatarUrl: settings.adminOrigin() + '/api/v1/cloudron/avatar' };