Jesús Dugarte
Software Engineer
Portrait of Jesús Dugarte
Jesús Dugarte
Software Engineer

A two way email engine for a project management app

Client
B2B project management SaaS
Year
Problem
Much of the project work in this app happened by email, with people outside the app. Replies and invoices sat in inboxes until someone copied them in by hand.
What I built
I was the main engineer and architect of a two way email pipeline in Rails. Every email the app sends gets an auto generated Reply To address. Incoming mail arrives through Amazon SES and SQS. A routing layer works out which company and project each message belongs to, and Sidekiq jobs process it by type. Replies land on the right record. Invoice PDFs are parsed into invoice records, with the original attached. It shipped in phases behind feature flags.
Why it was hard
The hard part was trust. Each message had to land on the right company and project with no one to ask. The wrong match would file a reply or an invoice in the wrong place. Each email type also needed its own job, and the rollout had to stay behind feature flags so the mail people already used kept working while the new path grew.
Outcome
Replies and invoices landed on the right record without anyone retyping them. One routing layer decides where an email belongs and each email type has its own job, so new types are easy to add.
Stack
  • Ruby on Rails
  • Amazon SES
  • Amazon SQS
  • Sidekiq
  • PostgreSQL
  • Feature flags

Back to case studies