Email infrastructure
you actuallyown.
One API across SendGrid, Postmark, Mailgun, and SES. Templates, suppressions, webhooks, and ML-routing live at the platform layer - not your provider's. Switch in one click. No code changes. No lost emails.
1import { Optail } from '@optail/sdk';2 3const mail = new Optail({ apiKey: 'ot_live_…' });4 5// One call. We pick the best provider for this send.6await mail.send({7 from: 'team@yourapp.com',8 to: 'jane@example.com',9 template: 'welcome-email',10 data: { name: 'Jane', plan: 'Growth' },11});One API · every major provider · already supported
// the lock-in tax
Email providers were never meant to be your data layer.
But that's where everything ends up - templates, suppressions, analytics, identity. Switching becomes a migration project. Deliverability tuning becomes vendor-specific. Compliance is whatever they offer.
Templates trapped in vendor dashboards
Your MJML, your variables, your translations - re-keyed every time you migrate. Marketing waits. Engineering re-implements. Bugs ship.
Suppression lists that don't travel
Bounces and unsubscribes live inside SendGrid (or Postmark, or Mailgun). Switch and you've forgotten who told you to leave them alone - that's a CAN-SPAM violation, not just bad UX.
One outage = one lost release
When your single provider has a bad afternoon, your password resets queue up. Multi-provider failover means rewriting half your sending code - so nobody does.
// how it works
One layer between your app and every email provider.
Send to one endpoint
Use the Optail SDK or REST API. One request shape, regardless of which provider eventually touches the wire.
Routing decides
Rules-based for the cases you know. ML-based for the ones you don't. Routes by domain, tag, ISP history, time-of-day, cost - and auto-fails over.
State stays with you
Templates, suppressions, events, opens, clicks - versioned and queryable in Optail. Your provider becomes interchangeable plumbing.
// why optail
More than an abstraction. An intelligence layer.
Replacing your provider's SDK is the easy part. The reason teams stay locked in is everything else - and that's what Optail rebuilds at the platform layer.
Bring an IP. Optail handles the ramp.
Connect a dedicated IP from any provider - SendGrid Pro, Postmark, SES dedicated. Optail schedules a per-ISP 14-stage volume ramp, routes overflow through warm pools, and pauses the schedule the moment bounce rate steps out of bounds.
Ask "why did Gmail bounce?" in chat.
An embedded agent that reads your sends, your suppression list, your DNS, and your provider events - then explains, fixes, or hands you a curl.
Root-cause analysis, not dashboards.
When deliverability drops, an engine correlates blocklist hits, DNS regressions, content signals, volume spikes, and per-ISP patterns into a ranked report with remediation actions - many auto-applied.
analyzers: blocklist · dns · content · spike · ISP-specific
MJML + Handlebars, versioned in Optail.
Compile once, send through any provider. Roll back to any version. Preview with sample data. Health-checked for spam triggers before they ship.
Org · domain · group · user.
HMAC-signed unsubscribe links, suppression state portable across providers, full SendGrid-parity policy hierarchy. CAN-SPAM and GDPR-clean by default.
Switch providers in one click.
Outage on Postmark? Promote SendGrid as default before the page completes its incident. No code changes, no redeploy, no in-flight loss.
One event shape. Every provider.
Bounce codes parsed and categorized by interpreter. Soft, hard, transient, blocked - same schema whether the source is SES or Mailgun.
// intelligence layer
The smartest provider for this send, every send.
Most "multi-provider" tools round-robin. Optail trains a per-org model on your own send history and scores every provider in real time. When something goes wrong, an RCA engine isolates the cause before a human pages.
Six features. One probability. Per provider.
Each provider gets a live score for this exact send. The model retrains as you send. New providers cold-start with sensible priors and learn within hours.
"Why did Gmail start bouncing at 2:02pm?"
Ask in chat or trigger by alert. The engine correlates signals across providers, DNS, content, and volume - and proposes a fix it can run.
// for developers
The SDK you'd write yourself.
First-class clients in Node, Python, Go, and Ruby. Typed end-to-end. Idempotency keys built in. Streaming responses for batch sends. Open-source under MIT - read the code, fork it, host it.
import { Optail } from "@optail/sdk";
const mail = new Optail({ apiKey: process.env.OPTAIL_KEY! });
await mail.send({
to: "jane@example.com",
template: "welcome-email",
data: { name: "Jane", plan: "Growth" },
// optional: pin to a provider, otherwise the model picks
// provider: "postmark",
});// enterprise plane
Trust isn't a tab. It's the product.
The enterprise features ship in the open-source core - no separate SKU, no walled garden. Self-host or use our cloud, the controls are the same.
SOC 2 evidence, continuous
Each control has a live evidence collector. Auditors get a real-time link, not a PDF dump.
Region-pinned data residency
EU, US, or self-hosted. PII never leaves the region you choose. Audit log proves it.
SSO + audit logs
SAML & OIDC for any IdP. Every config change, key rotation, and send-as-user emits a signed audit event.
Encryption at rest + in flight
AES-256 for templates, suppressions, and event store. Per-org KMS keys on enterprise.
CAN-SPAM · GDPR · ePrivacy
HMAC-signed unsubscribe links, suppression hierarchy, and DPA on file. The compliance plumbing is the product.
Security score, live
A 0–100 grade across DKIM, SPF, DMARC, BIMI, MTA-STS, TLS-RPT - with one-click remediation.
// open source
MIT-licensed.
Self-host or use our cloud.
Optail is open source the way developer tools should be: no "open core" tax, no enterprise-only features behind a wall. The same code we run in production is the code on GitHub.
Open-source email infrastructure. One API across SendGrid, Postmark, Mailgun, SES - with ML routing, RCA, and full deliverability tooling.
$ docker compose up
// ship today
Stop renting your email layer.
Own it instead.
Free up to 50,000 emails/month. No credit card. Five minutes from npm install to first send.