The templates/ folder contains the HTML/Markdown templates used in sending emails.
We use HTML/Markdown templates as skeletons of the emails that we intend to send out; there are placeholder varaibles in the tempalate that should be populated before sending (for this HandlebarsJS is used).
Mailgun is the service we used for sending emails, it’s difficult to find documenentation about the actual interface of their ‘Sending API’ - they go through some examples here though.
A couple of things to note, emails are prevented from actually being send out when running the project in dev mode (e.g. using the pnpm dev command). And, emails are to be saved into the database for the sake of tracking deliverability (integrates with Mailgun).