Skip to content

Commit

Permalink
Email tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
francisli committed Sep 6, 2024
1 parent 338ba4a commit 7658273
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 8 deletions.
10 changes: 9 additions & 1 deletion server/emails/_header.html.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,15 @@

<!-- START CENTERED WHITE CONTAINER -->
<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="main" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background: #ffffff; border: 1px solid #eaebed; border-radius: 16px; width: 100%;" width="100%">

<!-- START BRAND HEADER AREA -->
<tr>
<td style="background-color: rgb(208, 235, 255); height: 80px; display: flex; justify-content: center; align-items: center; border-top-left-radius: 16px; border-top-right-radius: 16px;">
<img src="<%= _layout.logoUrl %>" width="34" height="34" alt="SF Life Line logo"/>
<h1 style="margin-left: 4px; position: relative; top: 1px; font-size: 22px; line-height: 1;">
SF Life Line
</h1>
</td>
</tr>
<!-- START MAIN CONTENT AREA -->
<tr>
<td class="wrapper" style="font-family: Helvetica, sans-serif; font-size: 16px; vertical-align: top; box-sizing: border-box; padding: 24px;" valign="top">
2 changes: 1 addition & 1 deletion server/emails/invite/html.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<% if (firstName) { %><p>Dear <%= firstName %>,</p><% } %>

<p>You've been invited to create an account with San Francisco Life Line. To accept, click on the following link:</p>
<p>You've been invited to create an account with SF Life Line. To accept, click on the following link:</p>

<%- include('../_button.html.ejs', { label: 'Accept Invite', url }) %>

Expand Down
2 changes: 1 addition & 1 deletion server/emails/invite/text.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% if (firstName) { %>Dear <%= firstName %>,<% } %>

You've been invited to create an account with San Francisco Life Line. To accept, click on the following link:
You've been invited to create an account with SF Life Line. To accept, click on the following link:

<%= url %>

Expand Down
2 changes: 1 addition & 1 deletion server/emails/passwordReset/html.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<p>Dear <%= firstName %>,</p>

<p>We have received a request to reset your password for your SF Lifeline account.</p>
<p>We have received a request to reset your password for your SF Life Line account.</p>

<%- include('../_button.html.ejs', { label: 'Reset Password', url }) %>

Expand Down
2 changes: 1 addition & 1 deletion server/emails/passwordReset/subject.ejs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Reset your password for your SF Lifeline account
Reset your password for your SF Life Line account
2 changes: 1 addition & 1 deletion server/emails/passwordReset/text.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Dear <%= firstName %>,

We have received a request to reset your password for your SF Lifeline account.
We have received a request to reset your password for your SF Life Line account.

Click on the following link to reset your:

Expand Down
2 changes: 1 addition & 1 deletion server/emails/passwordResetSuccess/subject.ejs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Your SF Lifeline password changed
Your SF Life Line password has been changed
11 changes: 10 additions & 1 deletion server/helpers/email/mailer.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ const mailer = new Email({
extension: 'ejs',
},
},
juice: false,
});

export default mailer;
function send(options) {
options.locals ||= {};
options.locals._layout = {
logoUrl: `${process.env.BASE_URL}/logo.svg`,
};
mailer.send(options);
}

export default { send };

0 comments on commit 7658273

Please sign in to comment.