Skip to content

Correos — email outreach on Outlook

Mini-CRM on Microsoft 365: sends personalized emails from templates in drip batches and tracks who replied, who bounced and who is left to contact, with Outlook as the source of truth.

Sole developer

active

  • Next.js
  • React
  • TypeScript
  • Prisma
  • PostgreSQL
  • Supabase
  • Microsoft Graph
  • Tailwind CSS

Website

  • Templates with placeholders, sent in drip batches by a scheduler that runs inside Postgres (pg_cron)
  • Mailbox mirror over Microsoft Graph: reply from the app or from Outlook
  • Reply and bounce classification with automatic suppression and contact status tracking
  • Per-organization isolation with Postgres RLS, encrypted tokens and 288 unit tests

Context

I built Correos for the email outreach of a small company. They write personalized emails to batches of contacts and then need to know who replied, who bounced and who is still silent, and for how long. A plain mail merge does not answer that, and the replies end up scattered across Outlook. I am the only developer on the project.

What I built

A web app on top of Microsoft 365. Emails are written from templates with placeholders (name, company and so on), previewed per contact and sent in small batches spread over a time window and a daily cap. The database is a mirror of the mailbox, not its owner, so you can reply from the app or from Outlook and both stay in sync.

  • Contacts: CSV import with automatic column mapping, tags, filters, and a timeline of everything that happened with each contact.
  • Follow-up: the status of each contact (new, queued, contacted and waiting, replied, bounced, suppressed) is derived from their history, so it is easy to see who is left to write to and to filter by days of silence.
  • Inbox: conversation threads, replies with attachments, archiving and a disposition for each thread.
  • Queue: scheduled emails can be cancelled or rescheduled one by one.

Technical details

  • Next.js and React with TypeScript and Tailwind CSS; Prisma on PostgreSQL (Supabase).
  • The scheduler lives inside Postgres: pg_cron and pg_net call the app every minute to send what is due and every 15 minutes to sync the mailbox. A partial unique index makes sure the same email is never sent twice.
  • Microsoft Graph handles sending, the incremental mailbox sync (delta) and webhook subscriptions that renew themselves.
  • Each incoming message is classified as a bounce, an auto-reply or a human reply. A hard bounce creates a suppression automatically, and the contact status moves accordingly.
  • Multi-tenant isolation in two layers: every query goes through a tenant helper, and Postgres row-level security (RLS) with a restricted role enforces it again in the database.
  • Microsoft tokens are stored encrypted with AES-256-GCM.
  • 288 unit tests cover the pure logic: templates, classification, scheduling, contact status, CSV and pagination.

Result

It is deployed on Vercel and Supabase at zero cost, with the scheduler running on its own. The full chain was verified with real emails: sending through Graph, mirroring a real bounce and a real human reply, and updating the contact status in both cases.

Type to search