Receiving emails in your web application easily

about about 3 years ago

We don't update our blog frequently enough - I'm pretty sure we aren't
alone in
this. However, I do tend to send many emails per week to the rest of the
developers here at Isotope11 either outlining
various things I'm working on, or linking to neat ruby libraries I've
found, or
interesting web designs, or funny pictures of dogs.

Also, we're currently working on a rails engine that will provide drop-in
support for Github webhooks. We'll be using this integration to make it
dead
simple to tie work units in our open source time tracking system,
xrono, to the commits related to the work. With
that in
mind, I set out to make it equally as simple for us to post to the blog
without
having to take any extra effort.

CloudMailin

There's a service called CloudMailin that I
came
across once I'd decided to do this. They seem to be the best web service
for
quickly building support for incoming email into your application. Their
free
plan supports 200 emails per month, which should be more than sufficient
for our
needs here (though I am sure we'll use them for client projects that will
require a paid version in the future, since they're so awesome.) I have no
affiliation with these guys, I just love what they're doing since it's
precisely
what I wanted, at the right price.

Getting started

Go to their site and sign up for a free account. Then check out their
docs. Their site is a
rails-based site, so the ruby integration comes up front and center. They
just
give you an email address, and for each incoming email they hit you up with
a
webhook.

From there, it's painless to parse the subject line of the incoming email
for
[BLOG]. Then I take the rest of the subject as the post's title, and run
the
body of the email through a markdown parser. Just like that, it becomes
really
simple to post to our blog, and I'm unlikely to let it languish any longer
:)

Josh Adams is a developer and architect with over eleven years of professional experience building production-quality software and managing projects. Josh is isotope|eleven's lead architect, and is responsible for overseeing architectural decisions and translating customer requirements into working software. Josh graduated from the University of Alabama at Birmingham (UAB) with Bachelor of Science degrees in both Mathematics and Philosophy. He runs the ElixirSips screencast series, teaching hundreds of developers Elixir. He also occasionally provides Technical Review for Apress Publishing, specifically regarding Arduino microprocessors. When he's not working, Josh enjoys spending time with his family.