HACKER Q&A
📣 zaroth

Doing transactional email (and beyond) in your SaaS product?


Every SaaS app will start off with some code to send email for the basic functions of signup, password reset, maybe eventually billing, inviting new users to the account.

When doing this in small apps I’ve written, I inevitably start with some sort of email type enum, the ability to define templates for each type of email, usually starting by doing variable substitution in a plain text message, on to variable substitution in a rich text email.

Eventually the app grows and the types of users become more diverse and soon enough templates are piling up. Someone gets tired of editing these templates and demands a WYSIWYG editor. Someone else needs more dynamic content than what you can achieve with simple string.Format and you start contemplating how you can let them write JavaScript for pre-processing.

Marketing wants to know how many of these emails are getting opened and ways to flag customers who aren’t interacting with the email as potential renewal risks. Someone has the bright idea that it would boost engagement if we could add new email types that get sent based on hand-wavey account status type things like “not logged on in the last 15 days” or “upgraded 7 days ago” and all the criteria should of course have a web panel to configure this dynamic selection criteria for use by non-programmers in ways that isn’t go to blow up and send emails to every user by mistake.

So,... long story short - for a multi-tenant SaaS company that sends emails from their own domains, at the scale of ~10,000 users per domain, with no desire to fully outsource the whole program,... how do people like to tame this beast?

It seems like a scaling problem every SaaS company probably has to some degree, compounded if you are doing a multi-tenant platform type service, and massive risk of reinventing the wheel and sinking resources into something which entirely adjunct to the company mission.


  👤 ternarybash Accepted Answer ✓
Interested in this one.