Send email from Next.js in minutes
A plain HTTP call is all it takes. No SDK required: send transactional email from Next.js with the MailerOwl API.
No SDK to install
Use the HTTP client you already have in Next.js. The API is a single JSON endpoint.
Test mode keys
Develop against mo_test_ keys: the full pipeline, no real email.
Events and webhooks
Track delivery, bounces and complaints from your Next.js app with signed webhooks.
typescript
// app/api/welcome/route.ts
export async function POST(req: Request) {
const { email } = await req.json();
const res = await fetch("https://api.mailerowl.com/v1/emails", {
method: "POST",
headers: { Authorization: "Bearer " + process.env.MAILEROWL_KEY!, "Content-Type": "application/json" },
body: JSON.stringify({ from: "Acme <hello@acme.com>", to: [email], subject: "Welcome", html: "<p>Hi!</p>" }),
});
return Response.json(await res.json());
}Questions
Is there an official Next.js SDK?
Not yet. The API is intentionally simple: one POST with a JSON body.
Can I use SMTP from Next.js instead?
Yes. Use smtp.mailerowl.com on port 587 with your API key as the password.