SMTP to HTTP - Sinatra Email Handler for Heroku (like Posterous)
Python Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Blog Anywhere via Email


It all boils down to that. Convert an email into a POST email request, and you're golden. But good luck setting up a scalable email server! ;) Google has stepped in an done this for us already.

The email as params looks like this:

{"cc"=>"", "body"=>"Hello World!\n\nConvert my email to a POST!\n\n<em>Super Cool</em>", "sent"=>"Tue, 24 Aug 2010 00:54:26 -0500", "sender"=>"", "to"=>"", "subject"=>"Testing... testing!"}

That's so cool!


First, you need to get up and running with Google App Engine (I know, I know). Here's a helpful getting started with GAE article on Squidoo. I followed this tutorial for setting up GAE as a CDN.

Once you get Google App Engine installed, open the terminal and check to see if the commands work:

cd postable/mailer update . # deploy app . # run dev server at http://localhost:8080/

Once you get the cdn setup, or the running, go to http://localhost:8080/_ah/admin/inboundmail. From there you an send mail.

Read the rest of the source to get going.

It should be able to send email pretty easily too. Here are the quotas/limits of sending/receiving emails on GAE.

Heroku has a Sendgrid Addon which allows you to send 200 emails/day for free. GAE lets you send 2000 emails a day for free. Both are probably more than enough for the one-man shop. But with GAE you can handle incoming emails (incoming vs. outgoing emails). You can also send email for free on heroku using gmail.

Just found this blogging. Sendgrid. Parse API.

Point a subdomain MX record to our server, we parse incoming emails and post attachments and body contents to your web forms. Useful to have or interact with users through email.