Primitive · Live since 2026-05-13

FORMS → EMAIL.

The first stage of the loop. Postgres trigger + Node worker + SMTP backend of choice. End-to-end smoke validated to Gmail and Outlook.

What it does

A form lands. An email goes out.

Any form on any site posts to a Postgres-backed endpoint. A trigger fires. A worker picks up the row, drafts an email in the brand voice, sends via SMTP. Logged, retried with backoff if anything fails, exportable.

That's it. One job, done well. No CRM-lite, no marketing-automation creep, no scope drift. Forms in, email out.

Architecture

Three pieces, no surprises.

// the whole stack:
1. notification_queue table — Postgres, with FOR UPDATE SKIP LOCKED for concurrent workers
2. trigger on form_submissions — enqueues a notification row
3. worker.js — Node 20, ~280 LoC, pg + nodemailer, exponential backoff with jitter

Full source + schema: docs.

SMTP backends

Vendor-agnostic by design.

The worker doesn't care who sends the email. Change one env var, change the backend. Four presets ship in .env.example:

Resend (default)

smtp.resend.com:587 STARTTLS. Free 3K/mo. Recommended default for HitCreate-hosted.

Google Workspace

smtp.gmail.com:465 + 16-char app password. Free tier covers small ops, 2K/day limit.

Microsoft 365

smtp.office365.com:587 STARTTLS + app password. Tenant admin may need to enable SMTP AUTH.

Bring your own

Anything RFC-compliant: Postfix, Postmark, SES, Mailgun, Mailchannels, Brevo, your own Stalwart.

Three self-host paths

$0 to $50/mo, pick your shape.

$0

Path 1 — Cloudflare Workers + Neon

CF Worker for the endpoint + worker logic, Neon serverless Postgres for storage, Resend free tier. Everything free under low volume. Cold-start trade-off.

$5

Path 2 — Your VPS

Docker compose ships in the export — Postgres + worker container + systemd unit + your domain. Hetzner CX22 or DO Basic, $5/mo all-in.

$50

Path 3 — VPS + your own MTA

Full sovereignty: own VPS + Stalwart MTA + Resend or self-managed delivery. Recommended for sovereignty-leaning clients with specialist legal sign-off.

Heads up

Hetzner (and most VPS providers) silently block outbound TCP 25 and 465. Use port 587 STARTTLS for any SMTP from a VPS, or HTTP-API fallbacks (Resend, Postmark, SES). Self-host README has the detection script.

Live in production

Already running.

Smoke validated end-to-end to tommo003@gmail.com (inbox) and matt.thompson123@outlook.com.au (junk — Microsoft strictest receiver, expected, fix via warm-up + JMRP). Worker delivers in 4–30 seconds.

Running in production for Tee Off Sim Hire as of 2026-05-13. Next consumers: Closr, Sig Social, Account Management Assistant.

Try it in your stack.

Self-host the whole thing on Cloudflare for $0, or let us host it on Self-serve + Agent. Same schema either way.

See pricing

Takes 60 seconds. No card, no catch.