Sending Emails Made Simple with Resend and NextJs
Sending emails is a core feature in many apps: authentication (OTP, magic links), newsletters, receipts, notifications… But setting up SMTP servers, handling bounces, and ensuring deliverability is often a nightmare.
- September 3, 2025
- 02 min

That’s where Resend comes in. With a clean API and built-in support for NextJs, it makes sending emails as easy as a function call.
In this post, I’ll walk you through:
Why I chose Resend for my NextJs app
How to set it up in minutes
Sending your first email with just a few lines of code
Why Resend?
🚀 Quick setup — no SMTP headaches
📦 Great NextJs integration
🎨 Support for React Email templates
✅ High deliverability by default
Setup in NextJs
- Install Resend SDK
npm install resend
Get your API key
Create a free account on Resend, grab your API key.Use it in NextJs
Create a server action or API route:
// app/api/send/route.ts
import { Resend } from 'resend';
const resend = new Resend(process.env.RESEND_API_KEY);
export async function POST() {
try {
const data = await resend.emails.send({
from: 'Your App <onboarding@yourapp.com>',
to: 'user@example.com',
subject: 'Hello from Next.js + Resend 🚀',
html: '<p>Welcome to my app! 🎉</p>',
});
return Response.json(data);
} catch (error) {
return Response.json({ error });
}
}
Using React Email for Templates
Resend works beautifully with React Email. You can design emails like React components and send them directly.
import { Html } from '@react-email/html';
export default function WelcomeEmail() {
return (
<Html>
<h1>Welcome 🎉</h1>
<p>Thanks for joining us!</p>
</Html>
);
}
Then pass it to resend.emails.send()
My Experience
I integrated Resend into my app in less than 10 minutes. No SMTP configs, no delivery issues, just a clean developer experience. For me, that’s a huge win compared to traditional providers.
I even used it with Supabase to send verification emails for authentication, and it worked seamlessly. Resend handled the email delivery, while Supabase managed the auth flow — a perfect combo for building modern apps quickly.
Conclusion
If you’re building with NextJs and need email functionality, give Resend a try. It’s efficient, modern, and developer-friendly.