When we were building AI agents that needed to send and receive emails, AgentMail was the obvious first choice. Clean API, decent documentation. Then we hit the pricing page.
25 inboxes: $20/mo. 150 inboxes: $200/mo. 500+ inboxes: call us.
We needed hundreds of inboxes — different addresses for different agents, different domains for different clients. The per-inbox model didn’t scale.
What we built instead
Emails4Agents is four Docker containers:
- Postfix — handles inbound SMTP on port 25, routes to LMTP
- FastAPI — REST API layer, LMTP ingest server, webhook dispatch
- Supabase — Postgres database, authentication, Realtime for events
- Redis + Celery — async task queue for outbound sending and webhooks
Outbound mail goes through AWS SES at $0.10/1,000 emails. The whole stack runs on a $7/mo Hetzner VPS.
Feature comparison
| AgentMail | Emails4Agents | |
|---|---|---|
| 25 inboxes | $20/mo | ~$7/mo (hosting) |
| 150 inboxes | $200/mo | Same $7/mo |
| 500+ inboxes | Enterprise | Same $7/mo |
| Data ownership | Their servers | Your servers |
| Custom domains | Plan-limited | Unlimited |
| AI classification | Their models | Your OpenRouter key |
| MCP server | No | Yes (built-in) |
| Webhook events | Basic | 7 event types |
| Open source | No | Yes |
The tradeoff
AgentMail is easier to get started — no server to manage, no DNS to configure. If you need 10-20 inboxes and don’t want to run infrastructure, their starter plan is fine.
Emails4Agents is the right choice when:
- You need more than ~50 inboxes
- You want your email data on your own servers
- You’re building multi-tenant apps where per-inbox pricing kills unit economics
- You want to bring your own AI model for classification
Getting started
git clone https://github.com/finedesignz/emails4agents
cp .env.example .env
# Edit .env with your Supabase URL/keys, SES credentials
docker compose up -d
Full setup takes about 45 minutes including DNS configuration. See the API docs for the complete endpoint reference.