Emails [PRO]
For transactional and promotional emails, Sendgrid (opens in a new tab) is connected. Sendgrid has a free tier, so it's perfect for starting.
react-email (opens in a new tab) is used for designing emails with React.js and preview the layout in the browser.
The configuration and email templates are available at packages/emails
.
Sendgrid Setup
-
Create an account on Sendgrid (opens in a new tab).
-
Create a subscriber list by going to Marketing > Contacts in the sidebar. Then open the list and note the list ID in the URL going after
/lists/<list_id>
. -
Go to Settings > API keys in the sidebar and click Create API Key. Give it a name and restricted access to Mail Send and Marketing and click Create & View. Copy the key and paste it into the
.env
file.
SENDGRID_API_KEY=
SENDGRID_LIST_ID=
Email Templates
You can find all available emails at packages/emails/src/templates
. These emails are transactional and are sent on certain actions like verifying email or paying for the subscription.
Run pnpm dev
and open http://localhost:3002 (opens in a new tab) in the browser to see the email templates live.
Refer to react-email docs (opens in a new tab) to learn more.