Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 1.9 KB

File metadata and controls

39 lines (23 loc) · 1.9 KB

email/

This directory contains a React Email application which is used to write email templates using React JSX.

These templates are then built into *.html files which are then loaded at runtime to dynamically insert variables before sending the email off. View Backend Implementation below for details.

Requirements

Run

  1. Run pnpm i to install all dependencies
  2. Run just dev from the root directory to run the React Email dev server with sane defaults
  3. Run pnpm build to build all React Email files under emails/
  4. If you would like to build & copy all template files to the backend, run just email-gen from the root directory

Backend Implementation

Last updated: 02/15/2026

ReactEmailTemplater.java is the wrapper that allows the backend to use React Email templates.

Implementation

  1. ReactEmailTemplater will load the classpath HTML resource into a string.

  2. This will then be passed into JSoup so we can use DOM operations to insert our variables into the template.

  3. Once complete, we will then return the modified template back as a string.

Examples