Blogging by Email

Peter Rukavina

I’ve been making a concerted effort – although, to date, with somewhat lackluster results – to wean myself from Twitter, Facebook, et al., given their increasingly low signal to noise ratio.

Facebook’s not a big issue: I don’t write anything there, and I’ve found it not-too-difficult to live without pictures of the baby goats of that woman I once had the crush on in the mid-1980s. 

Twitter, though, is proving harder to kick. I have, after all, tweeted more than 33,000 times over the last decade, so it’s become something of a habit built in to my daily flow.

But, spurred on by the POSSE crew, I’ve come to realize that I don’t need to quit cold turkey: I can revert to the pre-2006 style of using this blog as my exclusive place to write on the web, and push as needed to other services to syndicate what I write to people who can’t, or won’t, drop by here.

Sort of like John Steinbeck in The Guardian in the 1940s.

Twitter’s ace in the hole, posting-wise, is its excellent Android client, which makes posting photos quite easy. I wanted to continue to be able to post photos, but I didn’t want to have to open a mobile browser, login to Drupal, and navigate through the process of creating a new post in that tiny environment.

So I decided to create a workflow that would allow me to post here via email.

Here’s how I did it.

I host my email with Fastmail, and Fastmail makes it very easy to set up new email aliases, so I set one up: a dedicated email address that would exist solely to receive and forward new posts for this blog.

Next, I created a new Postmark account and set up a new “Server” and then setup an Inbound webhook, allowing me to receive email at a special inbound.postmarkapp.com email address and forward it on as JSON via HTTP POST to a web service of my choice:

Postmark Inbound Webhook

A new Postmark account includes 25,000 “credits,” and each inbound email processed uses a single credit, so I should be good posting-by-email until pretty close to the end of time with my available balance.

Back on Fastmail, I set the “forwarding address” for my new blogging email address to this new Postmark webhook:

Fastmail Alias

And, finally, I created a PHP script to be the target of the webhook and strapped it to a secure server: the script receives JSON from Postmark, pulls it apart, finds any photos in the body and resizes them if needed and moves them into place where Drupal can find them, and finally creates a new Drupal node using the email’s subject line as the node title and the body of the email as the node body.

As a result, the flow for posting a photo here by email is as simple as this:

Blogging from my Android email client

I sent that email and, a few seconds later, this post resulted.

A few important things to note:

  1. There’s no authentication involved: anyone with the email address can post here. And so I use a hard-to-guess email alias. That said, sharing the email with a trusted friend is an easy way to allow someone else to post, no fuss no muss (that’s how [[Olle]] was able to post this photo).
  2. I recently updated the script to look for MP3 files in the email too; if it finds one, it creates a new “sound” node. Like this one, created by email from Street Food Thursday in Berlin.
  3. Another recent update: the body of the email is now assumed to be Markdown, and it’s converted from Markdown to HTML before being posted to Drupal.

This workflow has proved very satisfying. It’s now as easy to post a photo (or sound, or note) here as it is to post it to Twitter. And whatever I post ends up on Twitter anyway, via an IFTTT recipe that echoes all posts to new tweets:

And to Facebook as well:

Post on Facebook

My digital emancipation continues.

Add new comment

Plain text

  • Allowed HTML tags: <b> <i> <em> <strong> <blockquote> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /nowlook at my bio, listen to audio I’ve posted, read presentations and speeches I’ve written, or get in touch (peter@rukavina.net is the quickest way). 

You can subscribe to an RSS feed of posts, an RSS feed of comments, or a podcast RSS feed that just contains audio posts. You can also receive a daily digests of posts by email.

Search