Skip to content

Commit 8eefe5d

Browse files
committed
Add MJML templates for email
1 parent b07ad58 commit 8eefe5d

55 files changed

Lines changed: 3035 additions & 470 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.vscode/settings.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@
211211
"miscategorized",
212212
"misconfiguring",
213213
"Misrouted",
214+
"mjml",
214215
"mlflow",
215216
"moloco",
216217
"Moodle",

‎@types/mjml-template.d.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module '*.mjml?raw' {
2+
const content: string
3+
export default content
4+
}

‎_TODO.md‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,34 @@ https://aws.plainenglish.io/how-to-build-a-chatbot-using-aws-lex-and-lambda-in-2
1212

1313
- Re-enable link validator in `astro.config.ts` when pdf / downloads sorted out
1414

15+
## Email Sending Locations
16+
17+
These are the files where HTML is built as string literals and then passed to Resend:
18+
19+
- Contact form email HTML
20+
21+
`src/actions/contact/responder.ts:50`
22+
Function: `generateEmailContent(data, files)`
23+
It returns a full <!DOCTYPE html>... string built from form fields and attachments.
24+
25+
- Newsletter confirmation email HTML
26+
27+
`src/actions/newsletter/templates/confirmationHtml.ts:1`
28+
Function: `generateConfirmationEmailHtml(firstName, confirmUrl, expiresIn)`
29+
Full HTML email template returned as a template literal.
30+
31+
- Newsletter welcome email HTML
32+
33+
`src/actions/newsletter/templates/welcomeHtml.ts:1`
34+
Function: `generateWelcomeEmailHtml(firstName)`
35+
Full HTML email template returned as a template literal.
36+
37+
- DSAR verification email HTML
38+
39+
`src/actions/gdpr/email/dsarHtml.ts:6`
40+
Function: `dsarVerificationEmailHtml(props)`
41+
Full HTML email template returned as a template literal.
42+
1543
## Contact Page File Uploads
1644

1745
- Uppy, Tus server, whatever other server needed for file upload on Contact Form component

0 commit comments

Comments
 (0)