The Modern Email API Built for Developers
Send transactional emails through REST, SMTP, or official SDKs. Receive signed webhooks and inspect recorded message status.
Send your first email
Install the package, set your API key, and dispatch. Complete type definitions included.
import { Mailofly } from "@mailofly/node";
import { NextResponse } from "next/server";
const mailofly = new Mailofly({
apiKey: process.env.MAILOFLY_API_KEY!,
});
export async function POST(req: Request) {
const { email, name } = await req.json();
const result = await mailofly.emails.send({
from: "Acme <onboarding@yourdomain.com>",
to: [email],
subject: `Welcome to Acme, ${name}!`,
html: "<h1>Welcome aboard!</h1><p>Your workspace is ready.</p>",
tags: [{ name: "category", value: "onboarding" }],
});
return NextResponse.json(result);
}Engineered for High-Volume Production Apps
From your first verification code to millions of monthly receipts, Mailofly provides the developer primitives you need.
REST API Sending
Submit transactional email using JSON requests authenticated with your Mailofly API key.
Sending Identity Support
Send through verified-domain, Gmail, or SMTP identities configured for your workspace.
Automated Deliverability Alignment
Verify sending-domain DNS records and use suppression controls to manage blocked recipients.
Searchable Email Logs
Search email logs within your workspace's configured plan retention, up to 30 days.
HMAC-Signed Webhooks
Receive supported delivery and activity events with HMAC-SHA256 signatures and up to five delivery attempts.
MCP Server for AI Agents
Connect compatible AI assistants to authenticated Mailofly tools for sending email, managing contacts, inspecting logs, and checking domains.
Native Integration with Modern Frameworks
Drop Mailofly into your existing project without rewriting your auth or email business logic.
First-class support in App Router, Server Components, and Server Actions.
Trigger transactional emails directly from Postgres database webhooks or Edge Functions.
Lightweight, zero-dependency Node client with complete TypeScript declarations.
Python SDK for application and background-task workflows.
Why Developers Are Switching to Mailofly
Compare current capabilities and plan limits for your workflow.
| Feature | Mailofly | Resend | SendGrid |
|---|---|---|---|
| Free tier volume | 3,000 / mo | Check current docs | Check current docs |
| Log retention | Configured plan retention | Check current docs | Check current docs |
| Connected sending identities | Domain, Gmail, SMTP | Check current docs | Check current docs |
| Official MCP AI Server | Included | Check current docs | Check current docs |
| Universal SMTP Relay | Included | Check current docs | Check current docs |
Frequently Asked Questions about our Email API
Start Sending with the Mailofly API Today
Create your account, get an API key, verify your sending domain, and send your first email.

