The Automation Agency
Case study

The mail platform

A self-hosted email marketing platform, built once and forked per business.

Email deliverabilityAutomationDashboard & internal tool

Context

Own product. Built first for PuntHub, then forked for a second business as its own tenant. One codebase, separate deployments, separate data.

The problem

Email platforms charge per subscriber, and the price steps up exactly when a list starts to be worth something. For a business sending its own mail to its own list, most of that cost buys features it does not use — while the things that actually matter, deliverability and compliance, are the same everywhere.

What I built

  • Campaigns and automations — compose, segment, schedule, send, and resend to non-openers.
  • A drag-and-drop email builder plus reusable templates with merge tags.
  • Subscriber management with tags, segments, signup forms and hosted landing pages.
  • Open and click tracking, a preference centre, and one-click unsubscribe.
  • A transactional API with API keys, so other applications can send through the same platform — which is how the sister product pushes new signups in server-to-server.

Stack & integrations

Next.js · Supabase · Resend · GrapesJS and react-email · deployed on Vercel.

Hard parts

Compliance has to be structural or it rots. An audit of every send call site found the compliance pieces applied inconsistently: campaign sends had unsubscribe headers, tokens and suppression checks; the transactional API had none of the three; the welcome email had a token but no headers and no merge tags. The fix was not to paste four lines into seven places and hope the eighth remembered — every send path now goes through shared helpers that attach sender identity, the unsubscribe URL and RFC 8058 one-click headers, and check the suppression list before sending.

Sender identity is a recorded decision, not a default. The identity block is held byte-identical to the trading terms on the main site, with a comment in the code explaining what may and may not be added to it, so a later change cannot quietly drift out of line with what was published.

Results

Figures read from the production database on 17 September 2026, covering the 90 days to that date.

  • 2,742 active subscribers, from 4,965 subscriber records in total (the remainder unsubscribed, pending or bounced out).
  • 214,271 emails sent in 90 days.
  • 44 bounces — 0.02%.
  • 5 spam complaints — 0.002%. Mailbox providers commonly treat a complaint rate above 0.1% as a problem; this sits well under a tenth of that.

One honest limit: the delivery rate is not measured. The schema records bounces and complaints but does not persist the provider's delivered event, so "delivered" can only be inferred as sent minus bounced — 99.98%. That is an inference, and it is reported as one rather than as a measurement.

Next step

Twenty minutes. No pitch, no pressure.

If something here is close to what you need, bring the problem and I will say how close. If it is not, I will say that instead.