Skip to main content
The apps/email directory contains React Email templates and a preview server for viewing them in the browser.

Overview

Build transactional emails with React components and TypeScript. The preview server renders templates live as you edit.
turbo dev --filter=email

Creating a template

Add a .tsx file in apps/email/templates/. Export a default React component. Set default props to provide preview data in the dev server.

Sending emails

Send templates through @repo/email, which wraps Resend:
apps/app/actions/welcome.ts
import { sendEmail } from "@repo/email";
import Welcome from "@repo/email/templates/welcome";

await sendEmail({
  to: "user@example.com",
  subject: "Welcome aboard",
  react: Welcome({ name: "Jane" }),
});
Set RESEND_TOKEN in your environment variables to enable delivery.