Open source · Self-hosted

One API for every project's email.

Pouch sends through your own Amazon SES, Mailpace or Cloudflare account and logs every message and what happened to it.

View on GitHub $ npm i @joeyyax/pouch
Your receipt
sam@example.net
Delivered
  1. Queued14:32:06
  2. Sent14:32:07
    SES us-west-2
  3. Delivered14:32:09
    250 2.0.0 OK mx.example.net
Sends through + Your provider

Switch providers without a deploy

A domain's provider is a setting. Your code calls the same API either way.

Pauses before your provider does

A domain holds its queue at half the bounce or complaint rate SES reviews accounts at, until you release it.

Bodies you can really delete

Each message is encrypted with its own key. Retention shreds the key, and Pouch can't open the body again.

The record stays yours

Every send is a row in your Postgres, kept past your provider's retention. Export CSV, NDJSON or .eml any time.

Addresses your code creates

Inbound addresses with an expiry that code can read, reply from and forward.

Built in for agents

An MCP server that sends, reads the log and waits for mail to arrive.

Also Passkeys and sign-in links · DMARC reports · blocklist checks · signed webhooks · SMTP · TypeScript SDK · push alerts when a check fails

How Pouch works

Your app POST /v1/emails REST · SDK · SMTP log · suppressions · pause one provider per domain Amazon SESshop.example Mailpaceapp.example Cloudflare Email Serviceteam.example + Your providerimplements Adapter Inbox delivery events webhook Your app POST /v1/emails REST · SDK · SMTP log suppressions pause one provider per domain Amazon SESshop.example Mailpaceapp.example Cloudflare Email Serviceteam.example + Your providerimplements Adapter Inbox delivery events webhook

Your provider delivers

Pouch sends through your Amazon SES, Mailpace or Cloudflare account with your credentials. The domain and its reputation stay with the provider.

Pouch keeps the record

One API for every app and one dashboard that shows every message, its state and why.

No lock-in

Your sending records point at your provider, never at Pouch. Export the log and the mail any time; leaving is a code change.

delivered deferred bounced delivered queued sent bounced 550 5.1.1 does not exist
# the bounces, with the receiving server's reason
GET /v1/emails?status=bounced

{
  "id": "msg_8f2kq1",
  "status": "bounced",
  "reason": "550 5.1.1 The email account that you tried to reach does not exist."
}

Message log

Every message's state, with the provider's reason.

REST SDK SMTP provider
POST /v1/emails
{
  "from": "ada@example.com",
  "to": "sam@example.net",
  "subject": "Your receipt",
  "html": "<p>Thanks.</p>"
}
202 { "status": "queued" }

Send

REST, the or .

hard bounce example.com example.net example.org
POST /v1/emails
422
{
  "code": "recipient_suppressed",
  "message": "Recipient is suppressed:
    hard bounce on 2026-08-14."
}

Suppressions

A or stops sends to that address on all your domains.

Verify CNAME CNAME MX TXT
POST /v1/domains/{id}/verify

{
  "name": "example.com",
  "status": "pending",
  "missing_records": [
    { "type": "TXT", "name": "mail.example.com" }
  ]
}

Domains

Pouch fetches the and checks them until they resolve.

order-1042@in.example.com expires in 24h POST /hooks/inbound 200
POST /v1/addresses
{
  "domain_id": "dom_4c1x",
  "local_part": "order-1042",
  "expires_in": 86400
}

# mail to it reaches your endpoint as address.received

Inbound

Mail arrives at your . Code can create addresses that expire.

subscribed subscribed pending Unsubscribe one click, no form
POST /v1/lists/{id}/members
{ "address": "kai@example.net" }

201
{ "status": "pending" }

# subscribed once kai confirms

Lists

Batches through SES, with and .

Left out on purpose Open and click tracking Templates Campaigns and segments A mail server of its own

Open source and pluggable

Run it

and come bundled. Bring a provider account and an .

git clone https://github.com/joeyyax/pouch
cp .env.example .env
docker compose -f docker-compose.self-host.yml up -d

Add a provider

Each provider is one . Write one for yours.

interface Adapter {
  send(message): Promise<Receipt>;
  domain: { create(name); verify(name, id) };
  events: { verify(request); parse(request) };
}

Amazon's email sending service. Pouch sends with your AWS account and region.

aws.amazon.com/ses ↗

A transactional email provider. Pouch sends with your Mailpace account.

mailpace.com ↗

Cloudflare's email sending and routing service. Pouch sends with your Cloudflare account.

Cloudflare docs ↗

A TypeScript client for the API, with no dependencies.

npm ↗

SMTP is the protocol mail software speaks, and 587 is the standard port for submitting mail. Tools that can't call an API can still send.

RFC 6409 ↗

The receiving server says the address doesn't exist or will never accept mail.

The recipient marked a message as spam.

Entries you add where your domain's DNS is hosted. They prove to receiving servers that mail from your domain is yours.

DKIM, SPF and DMARC ↗

A URL in your app that Pouch calls with each event, like a delivery or an incoming message.

A new subscriber gets a confirmation email and only receives batches after confirming.

The unsubscribe button Gmail and other mail clients show above a message. One press removes the address.

RFC 8058 ↗

The database Pouch keeps messages, events and settings in.

postgresql.org ↗

An open source, Redis-compatible store. Pouch uses it for rate limits and live updates.

valkey.io ↗

Object storage that speaks Amazon S3's API, such as S3, Cloudflare R2 or MinIO. Pouch keeps message bodies and attachments there.

The code that connects Pouch to one email provider: sending, domain setup and delivery events.

Use and change the server freely. If you run a changed version for other people, share your changes under the same license.

gnu.org ↗

Use the SDK in any project, open or closed, with no obligations.

opensource.org ↗