Prerequisites
To get the most out of this guide, you’ll need to: Prefer watching a video? Check out our video walkthrough below.1. Install
Get the Resend Node.js SDK.2. Create an email template
Start by creating your email template oncomponents/email-template.tsx.
components/email-template.tsx
3. Send email using React
Create a route file underapp/api/send/route.ts (or pages/api/send.ts if you’re using Pages Router).
Import the React email template and send an email using the react parameter.
4. Try it yourself
Next.js (TypeScript)
Full-stack Next.js app with TypeScript
Next.js (JavaScript)
Full-stack Next.js app with JavaScript
Attachments
Send emails with file attachments
React Email
Send emails with React Email components
Templates
Send emails using Resend hosted templates
Scheduling
Schedule emails for future delivery
Double Opt-in
Double opt-in subscription flow
Inbound Webhooks
Receive and process inbound emails
Prevent Threading
Prevent email threading on Gmail
Audiences
Manage contacts and audiences
Domains
Create and manage sending domains
Better Auth
Email authentication with Better Auth