Mathi.
← All work

Client work

AI Outreach Email Engine

Personalized AI emails at 1,000–1,500 sends a day, scheduled across ~40 mailboxes so none of them lands in spam.

ReactTypeScriptPythonFastAPIPostgreSQLOpenAIPerplexityEmailEngineStripe

The problem

A US sales outreach platform needed every email researched and written for its recipient, then sent from each customer’s pool of mailboxes on the customer’s schedule — with follow-ups that stop the moment a lead replies, and without any mailbox getting flagged as spam.

My role

Senior Full Stack Engineer: generation pipeline, scheduling algorithm, job system, payments and mailbox integration.

How it works

  1. 01ResearchPerplexity gathers recent, public context about the lead
  2. 02WriteChatGPT drafts a personalized email from the research and campaign brief
  3. 03ScheduleMax 50 sends per mailbox per day, only on the customer’s chosen days
  4. 04Follow upFollow-up after the customer’s chosen gap — cancelled if the lead replies
  5. 05TrackAnalytics: sent, remaining in the set, replies

Key decisions

A hard per-mailbox cap

Each mailbox sends at most 50 emails a day. With 4 customers and about 10 mailboxes each, the scheduler spreads 1,000–1,500 daily sends so no single mailbox spikes and gets flagged as spam.

Replies cancel follow-ups, per lead

When a lead replies to the first email, only that lead’s queued follow-up is cancelled. Nobody gets a “just following up” after they have already answered.

Separate research from writing

Splitting retrieval (Perplexity) from generation (ChatGPT) made each step testable on its own and kept facts and tone as separate concerns.

Outcome