Post By Email

September 22, 2021

Yesterday I created a “post by email” system to make it super easy to publish blog posts. Posterous already did this back in the day and I guess Wordpress does it too. Well, now my Hugo site also supports posting by email.

Here’s the code: post-by-email

It’s a pretty basic Python package, but for the right person it’s a good reference on using IMAP with Python, reading the IMAP RFC, and as an example of how I do Python packaging, test-driven development and simple devops using Make and Python scripts.

At the moment the package is specific to my needs for my site, but I’m willing to generalize bit by bit if anyone else wants to use it. Otherwise, if you want your own “post by email”, just use mine as a guide and change the code where you need to for you purposes.

The nice thing about post-by-email is that now I’m writing blog posts in my email client while sitting through a meeting. Now I can post from my phone without worrying about Hugo, or environment variables or anything like that. Just send an email and then post-by-email adds the content, builds the new site and deploys.

I’ve done similar stuff in the past with Netlify and Github Actions, but for my purposes right now, posting by email is better.