The joys of implementing an email service

Published on: 19 May 19:31

We need more and we need it now.

They say a sufficiently large business will implement its own accounting software at some point. This is exactly the same sentiment with our clients and their applications.

Products that started life with a hard-coded landing page eventually grow up (if they survive) to need a CMS (we solved that in version 0.1). After being able to edit content and add new pages on a whim, the next request is some sort of mass email solution (for marketing purposes).

Right now, when our clients need to send promotional emails they have two options:

  1. Use an external service like Mailchimp
  2. Use the same transactional email service that their app uses to send promotional emails (bad idea)

I strongly discourage the second option (for obvious reasons) but at a certain point promotional email services get expensive (compared to something like AWS SES or even Mailgun) and are limited to noreply email addresses.

The second point, is a big concern for savvy clients who want their customers to feel special and connected with the brand.

What if we could build a generic email service, that could:

  1. provide email boxes for simple use cases
  2. plug into any domain/subdomain (at the DNS level via an MX record and a catch all condition)
  3. allow you to send promotional emails in a compartmentalized way

So I go cracking, and spent the last 3 or so weeks learning a lot of stuff related to parsing emails, setting up the DNS, handling attachments and the like

Hold up, not so fast

Email clients are ridiculously complicated. The current email client implementation in violet_rails consists of a lightly customized ActionText, ActionMailer based module that is connected to Mailgun.

Basic usability is good and test coverage is adequate so its a very good starting point for some custom features.

It supports:

  1. Sending/receiving emails (duh)
  2. Email threads
  3. User permissions
  4. Attachments

Thoughts on improvements

violet_rails is a code-first platform. Every feature we (well I, so far) ship can be the foundation of something remarkable (if you put enough effort into it). And as cliched as it sounds, thats just what this platform is.

Sure, I'd love to have an amazingly well polished base template that is usable to create landing pages, marketing campaigns and all the rest of the things you need to do when you are looking to test the waters with a new product.

For me, thus far the motivation for this project has been from how good I can make it as a starting point -- and as for where it goes, that is upto whoever deploys or forks it for their own purposes.

So, dear reader-- Fork the project, and hack on top of it! I'd love to know your thoughts on how we can improve violet_rails

- Shashike

If you want to keep up with the latest developments on this project

Reach out to us from our website or check out the official forum!