The Modern Email API Built for Developers
Send transactional emails, trigger event-driven notifications, and receive signed webhooks with sub-100ms API latency. Zero vendor lock-in with multi-provider failover.
Send your first email in under 60 seconds
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.
Sub-100ms Dispatch Latency
Engineered on globally distributed edge runtime handlers. Your transactional API requests are processed and accepted in tens of milliseconds.
Multi-Provider Failover
Zero single point of failure. Mailofly dynamically routes traffic across AWS SES, Mailgun, and SendGrid fallback backbones if an upstream provider degrades.
Automated Deliverability Alignment
Automatic SPF, DKIM (2048-bit), and DMARC enforcement. Clean IP warming and bounce suppression protect your sender reputation from day one.
15-30 Day Searchable Log Retention
Inspect complete payload headers, delivery attempts, SMTP response codes, and recipient activity. 15 days on free, 30 days on paid plans.
Standard Webhooks with Signatures
Deliver status events (delivered, opened, clicked, bounced, complained) to your servers with cryptographic HMAC-SHA256 Standard Webhook verification.
MCP Server for AI Agents
First email infrastructure with an official Model Context Protocol (MCP) server. Let Claude, Cursor, or your autonomous AI agents safely draft and send emails.
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.
Asynchronous client for high-concurrency event pipelines and background workers.
Why Developers Are Switching to Mailofly
More capabilities, longer log retention, and fair transparent pricing.
| Feature | Mailofly | Resend | SendGrid |
|---|---|---|---|
| Free tier volume | 3,000 / mo | 3,000 / mo | 100 / day (Trial) |
| Log retention | 15–30 days | 1–3 days | 3 days |
| Multi-provider failover | Native built-in | No (single vendor) | No |
| Official MCP AI Server | Included | No | No |
| Universal SMTP Relay | Included | Included | Included |
Frequently Asked Questions about our Email API
Start Sending with the Mailofly API Today
Sign up in 30 seconds. Get your API keys, verify your sending domain, and ship your emails.