This post is part of a series of open source projects that we’ll be releasing in the next while, as described previously here.

Email Capture

One of the most common things we do is create landing pages to collect folks’ email addresses. There are plenty of service that do this (like launchrock) but they’re always too cluttered and don’t let us have full control of the experience.

We’re makers at heart and care about the simple animations on a sign-up form and how users interact with it. Even though it’s just a landing page, we want the users to know that we care that they’re signing up.

As easy as it sounds, we always have to put together a small app hosted on somewhere like heroku and do a Mailchimp integration to collect the emails. So we decided to build a microservice on top of stdlib to take care of all of that and make it super simple for us to host serverless landing pages.

We’ve called it the email-service – since we want it to support sending emails as well – and we’re open sourcing it. It supports a simple subscribe function and can be used to build simple landing pages, here’s an example:

Sending Email

If you’ve been around product companies enough, you know that changing email providers is a scary journey, sometimes taking many weeks for implementation. This is usually because the email service is very baked into the product that you’ve built and switching isn’t really an easy task.

This is where microservices can be incredibly helpful – a wrapper around your email client so you can switch services quickly and not have to worry about baking it too much into your product code.

This is why the email service supports a send function that we use in our product (currently built on top of Mandrill). In the future, if we want to switch to another provider (like SES), then all we have to do is launch the stdlib service that supports it. It’s super simple to use: