SendGrid — An Event API Introduction


What is SendGrid?

SendGrid is a hosted email platform designed to keep you focused on your core competencies and out of the squirrel’s nest that is SMTP infrastructure.

Why not spin up a dedicated SMTP server? It’s not that hard.

You’re right. It’s not terribly hard to setup Postfix or Port25’s PowerMTA server. We vetted a number of 3rd-party tools and definitely considered rolling our own. They’re all effective options.
Given the capabilities SendGrid offers out-of-the-box, however, it doesn’t make sense for us to spend the time or budget recreating the wheel. And let’s be honest, the cost of infrastructure is more than just hardware. I’d prefer not to waste time on SMTP administration when I can focus on making HiringThing better instead.

HiringThing depends on mature mechanisms being in place to eliminate downtime. You expect email to just work, right? SendGrid helps us make that belief a reality.

  • Replacing our existing SMTP configuration with SendGrid was nearly painless. They have excellent documentation for multiple programming environments.
  • SendGrid’s support staff are delightfully responsive. Ask a question via chat and you can expect a well thought out response.
  • Their analytics platform is continually improving. They appear to be an agile company willing to learn from their customers feedback.

How does HiringThing use SendGrid?

Our use of the SendGrid platform is threefold:

* First we leverage their SMTP service and segregate our mailings into different categories so we can minimize damage from bounces, spam reports, etc. * We use the email parsing API to extract information from HiringThing’s email responses. This allows HiringThing to maintain an accurate record of correspondence between our users and their respective applicants. * The third tool we leverage is the Event API which, in my opinion, is reason alone to use SendGrid.

The SendGrid Event API

SendGrid provides a series of touch points in the delivery cycle. Each of which is available as a web-hook. This diagram (taken directly from SendGrid’s website) shows all the places you can interface with their API .

SendGrid Event API

To leverage these web hooks we wrote a pretty simple controller to process an incoming event and take the corresponding action. Enabling a web hook on the SendGrid side is as easy as a checkbox. Enable each event type you want to receive a POST for and specify a URL . It’s that easy.

Maintaining a good reputation for our IP addresses (and the corresponding domains we send from) is important in maximizing our deliverability.

We process all bounces (hard or soft), spam complaints (they’re unavoidable), and blocks (blacklisting is very bad news) by marking a user in our system as unsubscribed and then taking the appropriate action with our various ESP feedback loops.

What’s next?

The one-size-fits-all Rails approach to SMTP settings doesn’t really work for us. In my next post I’ll share some code for how you can leverage multiple sub-accounts with SendGrid.

HiringThing

Author: HiringThing

HiringThing is easy to use, intuitive online recruiting software that makes it easy to post jobs online, manage applicants and hire great employees.