Posthawk
AnnouncementJan 28, 20256 min read

Why We Built Posthawk: Open Source Email Infrastructure

Email is the backbone of every SaaS product. Password resets, onboarding flows, invoices, notifications — they all depend on reliable email delivery. Yet most teams are stuck choosing between expensive managed services that lock you in, or cobbling together raw SMTP with no visibility into what happens after you hit send.

The problem with existing solutions

We spent years building products on top of services like SendGrid, Postmark, and Mailgun. They work, but they come with trade-offs that became harder to accept over time.

  • Vendor lock-in: Proprietary APIs mean migrating is painful. Your templates, analytics, and sending reputation are stuck on their platform.
  • Opaque pricing: Costs spike unpredictably as you scale. Overages, add-ons, and per-seat charges pile up quickly.
  • No data ownership: Your email logs, bounce data, and engagement metrics live on someone else's servers.
  • Limited customization: You work within their constraints. Need a custom webhook format? A specific retry strategy? Too bad.

Why open source matters for email

Email infrastructure should be a utility, not a profit center. Just like databases moved from proprietary to open source (MySQL, PostgreSQL), email infrastructure deserves the same treatment. You should be able to inspect every line of code that handles your users' data, deploy it on your own terms, and modify it to fit your exact needs.

That's why we built Posthawk. It's a complete email infrastructure platform — sending, scheduling, receiving, and templating — that you can self-host with a single Docker Compose command. The entire codebase is MIT licensed.

How Posthawk works

Posthawk sits between your application and AWS SES. You send emails through a clean REST API, and Posthawk handles queueing, delivery, scheduling, bounce processing, and analytics. Here's what sending an email looks like:

bash
curl -X POST https://your-posthawk.com/api/v1/emails/send \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "user@example.com",
    "subject": "Welcome to our platform",
    "template": "welcome",
    "variables": { "name": "Alice" }
  }'

Under the hood, Posthawk uses BullMQ for job queuing, ensuring emails are processed reliably even under heavy load. Failed deliveries are automatically retried with exponential backoff. Every email is tracked from queue to delivery, giving you full visibility.

The road ahead

We're just getting started. Our roadmap includes multi-provider support (Mailgun, Postmark, SMTP), a visual template editor, advanced analytics with deliverability scoring, and webhook integrations for third-party services. Everything will remain open source and free to self-host.

If you believe email infrastructure should be open, transparent, and developer-owned, we'd love for you to try Posthawk. Star us on GitHub, deploy it in 5 minutes, and let us know what you think.

Next article
Tutorial

Self-Hosting Email: A Complete Guide Using Docker