Docs
Apps
React Email Preview
The starter kit includes React Email for creating emails with React and TypeScript. React Email also includes a preview server for email templates.
Start the preview server
To preview email templates, run:
pnpm --filter react-email-preview dev
Now the preview server runs at http://localhost:3003
Add a new preview template
When you create a new email template, add also a new file for the preview. For example apps/react-email-preview/emails/my-email-template
would look like the following:
import * as React from 'react';
import { MyEmailTemplate } from '@workspace/email-templates/my-email-template';
export default function RenderedEmail(): React.JSX.Element {
return (
<MyEmailTemplate
appName="Acme"
name="John Doe"
/>
);
}