MepMail Docs

Introduction

What MepMail is and how the pieces fit together.

MepMail is the open-source email platform for people, AI agents and applications.

Choose either product, or use both in the same account:

  • Mail gives people and AI agents mailboxes on your domain. Read, draft and reply with the permissions you grant. See Mailboxes and MCP access.
  • Send delivers your application's email through a Resend-compatible API, SMTP or MCP. Start with the quickstart.

Use it two ways, running the same code either way:

  • MepMail Cloud — the hosted service at mepmail.dev. Create a Send Free account without a card; paid plans and the Mail trial have separate payment terms on Pricing. Start with a dashboard test before verifying a domain in the quickstart. API at api.mepmail.dev.
  • Self-hosted — run it on your own infrastructure with Docker Compose, sending through your own AWS SES account. See Self-hosting.

Both share one dashboard, one HTTP API, and the same official Resend SDKs — these docs cover both, and the Cloud / Self-hosted tabs you'll see on some pages remember your choice. Around the sending core you get a dashboard, an HTTP API, webhooks, contacts, broadcasts, and an SMTP relay.

Move from Resend in one command

npx @mepmail/cli migrate --from resend

The CLI reads your Resend account (GET requests only), shows the plan and, after you confirm, copies contacts, segments, topics, properties, templates, webhooks, suppressions and domains to MepMail. migrate plan previews without writing; migrate rollback deletes only what the tool created. For the supported sending calls, your code then changes in two variables:

Before: Resend
RESEND_API_KEY=re_...
After: MepMail
RESEND_API_KEY=ms_...
RESEND_BASE_URL=https://api.mepmail.dev

Migrate from Resend has the full guide.

Resend-compatible API

The HTTP API follows the Resend API format: same request and response shapes, same error format. Official Resend SDKs honor a configurable base URL, so migrating an existing integration means changing two environment variables — the API key and the base URL — not rewriting your code. There is no SDK of ours to install: the SDKs page covers the official Resend SDKs for nine languages, base URL rules included.

One deliberate difference: contacts are team-global. There is no "audiences" concept — every contact belongs to your team directly, and you target subsets with segments (saved filters) and topics (opt-in categories). See Contacts.

What's included

AreaNotes
Emails APISend, batch, get, cancel scheduled sends. Idempotency via the Idempotency-Key header.
ContactsTeam-wide contacts with subscribe state, custom properties, and CSV import.
SegmentsSaved filters over contacts, usable as broadcast targets.
TopicsGranular subscription categories wired into the hosted unsubscribe page.
BroadcastsCompose, schedule, and send to all contacts, a segment, or a topic.
TemplatesReusable templates with per-contact merge fields.
DomainsGuided DNS verification, BYODKIM, per-domain tracking and TLS settings.
WebhooksStandard Webhooks signatures, per-endpoint event selection, delivery log.
SuppressionsHard bounces and complaints suppressed automatically.
One-click unsubscribeRFC 8058 List-Unsubscribe headers plus a hosted unsubscribe page.
SMTP relaySMTP on port 2587 with STARTTLS, authenticated with an API key.
MetricsDaily sends with bounce and complaint rates tracked against SES thresholds.
DashboardFull dashboard in English and Brazilian Portuguese.

Architecture at a glance

MepMail sends through AWS SES — on Cloud that's managed for you; on a self-hosted deployment it's your own SES account, so you keep SES's deliverability and pricing. A self-hosted deployment is two containers:

  • Postgres — the only datastore. The job queue (pg-boss) runs on it too; there is no Redis.
  • App container — runs the API (port 3001), the background worker, and the web dashboard (port 3000). An optional third container runs the SMTP relay (port 2587). Processes can also be split one-per-container with the PROCESS environment variable.

Email bodies are encrypted at rest (AES-256-GCM envelope encryption) and purged after a retention window. Delivery events (bounces, complaints, deliveries) flow back from SES — on Cloud automatically; self-hosted through SNS into an SQS queue the worker long-polls, plus a push to your host when it has a public HTTPS URL.

Where to go next

  • Quickstart — from zero to your first email in a few minutes, on Cloud or your own instance.
  • Self-hosting — the full deployment reference.
  • API reference — generated from the server code, always in sync.

For AI agents

Every documentation page is available as raw markdown by appending .md to its URL (or sending Accept: text/markdown). /llms.txt is a machine-readable index, /llms-full.txt is the entire documentation in one file, and /openapi.json is the OpenAPI 3.1 spec generated from the API's code.

License

Download the corresponding source of the version running on MepMail Cloud for free, including its modifications. The archive filename and response header identify its revision.

The platform is AGPL-3.0. The two npm packages — @mepmail/mcp and @mepmail/cli — are published separately under MIT. Neither is an SDK.

On this page