Use this pre-built prompt to get started faster.
Prerequisites
Before you start, you’ll need:- A Resend API key
- A verified domain
- Have a Cloudflare worker with a bundling setup
- Recommended to be bootstrapped with
npm create cloudflare
- Recommended to be bootstrapped with
Guide
Create an email template
Start by creating your email template on
src/emails/email-template.tsx:src/emails/email-template.tsx
Send the email using React and the SDK
Change the file extension of the worker’s main file to
tsx and modify your configurations.After that, you can send your email using the react parameter:src/index.tsx
Examples
Cloudflare Workers Example
See the full source code.