From a920041c5b12eab72b5daeb71eaea11129cec8f8 Mon Sep 17 00:00:00 2001 From: Ben Haynes Date: Thu, 18 Nov 2021 17:18:48 -0500 Subject: [PATCH] Email updates (#9921) * add from name for emails * updatd email template style * reset password email copy * updated logo to newest version * update invite email copy --- api/src/services/mail/index.ts | 6 +- api/src/services/mail/templates/base.liquid | 219 +++++++++++------- .../mail/templates/password-reset.liquid | 5 +- .../mail/templates/user-invitation.liquid | 8 +- app/src/views/public/logo-light.svg | 4 +- 5 files changed, 150 insertions(+), 92 deletions(-) diff --git a/api/src/services/mail/index.ts b/api/src/services/mail/index.ts index f82349d89d..cad440908b 100644 --- a/api/src/services/mail/index.ts +++ b/api/src/services/mail/index.ts @@ -48,13 +48,13 @@ export class MailService { const { template, ...emailOptions } = options; let { html } = options; - const from = options.from || (env.EMAIL_FROM as string); + const defaultTemplateData = await this.getDefaultTemplateData(); + + const from = `${defaultTemplateData.projectName} <${options.from || (env.EMAIL_FROM as string)}>`; if (template) { let templateData = template.data; - const defaultTemplateData = await this.getDefaultTemplateData(); - templateData = { ...defaultTemplateData, ...templateData, diff --git a/api/src/services/mail/templates/base.liquid b/api/src/services/mail/templates/base.liquid index 40f0a2b870..c396183ddc 100644 --- a/api/src/services/mail/templates/base.liquid +++ b/api/src/services/mail/templates/base.liquid @@ -1,95 +1,152 @@ - - - + + - - - - {{ projectName }} Email Service +{{ projectName }} Email Service - + + + + + - p { - margin: 20px 0 20px 0; - } - + - - - - + +
- + + + +
+ + + - - - +

+ + + +
+ + + + + + + + - -
+
+ +
+
+
+ {% block content %}{{ html }}{% endblock %} -
-
- - - + + + - -
+ + +
+

+ Sent by the team at {{ projectName }} — Manage Emails
{% block footer %}{% endblock %} -

-
+ +
- - + \ No newline at end of file diff --git a/api/src/services/mail/templates/password-reset.liquid b/api/src/services/mail/templates/password-reset.liquid index ccd1806316..8548d5105d 100644 --- a/api/src/services/mail/templates/password-reset.liquid +++ b/api/src/services/mail/templates/password-reset.liquid @@ -7,17 +7,18 @@

- Click to reset your password + Reset Your Password

Important: This link will expire in 24 hours. +

Thank you,
- {{ projectName }} + The {{ projectName }} Team

{% endblock %} diff --git a/api/src/services/mail/templates/user-invitation.liquid b/api/src/services/mail/templates/user-invitation.liquid index 585ab7291f..3dafd858ab 100644 --- a/api/src/services/mail/templates/user-invitation.liquid +++ b/api/src/services/mail/templates/user-invitation.liquid @@ -2,18 +2,18 @@ {% block content %}

- Hello. You have been invited to join {{ projectName }}. Please click the button below to accept this invitation and join the project: + You have been invited to join {{ projectName }}. Please click the button below to accept this invitation and join the project:

- Join {{ projectName }} + Join {{ projectName }}

- Thank You,
- {{ projectName }} + Thank you,
+ The {{ projectName }} Team

{% endblock %} diff --git a/app/src/views/public/logo-light.svg b/app/src/views/public/logo-light.svg index 816553f1f2..a5b0c2d0d9 100644 --- a/app/src/views/public/logo-light.svg +++ b/app/src/views/public/logo-light.svg @@ -1,3 +1,3 @@ - - + +