# codemail: mail.config.ts founder email — per-domain, not per-seat

Source: https://www.michaelchurley.com/blog/codemail-mail-config-as-code-founder-email-infra  
Published: 2026-03-26  
Author: Michael C. Hurley  
Tags: codemail, email, mail-config, infrastructure, convex, clerk, resend, smtp, nextjs, turborepo, founder, michaelmonetized

![Config as code](/blog/codemail-mail-config-as-code-founder-email-infra/screenshots/config-as-code.png)

## Who

I wanted company email on day 1 of an idea without paying Google or Microsoft per seat while the product was still a maybe.

For founders who think `mail.config.ts` in git should be law, ahead of another admin dashboard.

## What

I built **codemail**, private https://github.com/michaelmonetized/codemail (selection label HurleyUS/codemail; origin is michaelmonetized). HEAD `e9fece4`. **27** commits. Default **main**. Version **0.1.0**.

**Thesis:** email infrastructure for founders: config as code, per-domain pricing, unlimited mailboxes. Adjacent to Gmail, not a seat-for-seat swap.

![Day-1 workflow](/blog/codemail-mail-config-as-code-founder-email-infra/screenshots/day1-workflow.png)

**Shipped (weekend MVP arc):** Turborepo monorepo; `@codemail/config` (Zod + `defineMailConfig`); `@codemail/cli` (setup/deploy/status/dns/logs/users); `@codemail/smtp` on Fly; Convex backend; Next 15 web mail + dashboard; Clerk; Resend outbound; marketing Free Forever / Simple $8 / Managed $80 / Self-Hosted.

![Architecture](/blog/codemail-mail-config-as-code-founder-email-infra/screenshots/architecture-stack.png)

**Gaps:** PLAN still marks IMAP out while README + Simple tier market IMAP; GitHub public probe 404 (private) despite OSS CTA; `codemail.vercel.app` MIDDLEWARE 500 vs `codemail-web.vercel.app` 200; root `mail.config.ts` is informal t3.chat demo shape; `codemail.dev` unchecked.

![Docs vs shipped](/blog/codemail-mail-config-as-code-founder-email-infra/screenshots/docs-vs-shipped-gap.png)

## Where

Code: https://github.com/michaelmonetized/codemail (private).

Live marketing/app: https://codemail-web.vercel.app

SMTP: codemail-smtp.fly.dev (per TODO)

## When

**2026-02-12.** SMTP, then web mail, then dashboard, then Convex, then API, then auth/SEO, then Fly SMTP fixes, then marketing rewrite to business-plan thesis (same-day blast).

**2026-02-13.** public marketing routes + `(private)` auth route group.

**2026-02-15.** `62fcaed` better sales positioning (#1).

**2026-02-18.** `e9fece4` design updates. HEAD.

![Commit arc](/blog/codemail-mail-config-as-code-founder-email-infra/screenshots/commit-arc.png)

## Why

Day-1 company email should be a `git push`, not a $600/year seat tax. Config in the repo beats another dashboard click-path when the product is still a maybe.

**Engagement Q:** Ship IMAP before opening the repo public, or cut IMAP from the landing first?
