Blogging can be much more fun when you know you have a couple of cool WordPress options at your disposal. For instance, did you know that you can compose, format and publish WordPress blog posts right from inside your mailbox? Oh yeah, you can and it’s easy stuff :).
Just imagine the amount of work you can accomplish this way? Think of the flexibility and utility benefit this option brings you. I mean, you can post from wherever using any internet-enabled device whether or not you have the WordPress mobile app. If you are excited, let us look at the three main ways you can use to publish WordPress blog posts via email:
- Post by Email in Jetpack
- Advanced post by email settings (for intermediate to advanced WordPress users)
- WordPress post by email plugins
We will cover these methods one by one, giving you all the details you need to take full advantage of the WordPress post by email option. All these methods will require creating email accounts and configuring a few options, so you ought to have a great time. Let’s start with the Post by Email module in Jetpack.
Post by Email in Jetpack
Jetpack allows you to supercharge your self-hosted WordPress website by offering you a couple of nice features including Post by Email. So how do you post by email using Jetpack? Obviously, you must first install Jetpack on your WordPress site (Note: you cannot use this feature on a local installation of WordPress since JetPack, just an fyi if you were hoping to test this out on your localhost). With Jetpack installed on your WordPress platform, it is time for the next step: generating a special email address. You will send all the posts you would like to publish to this email address, so it’s important to keep it a secret. People (read hackers) with access to this email address can publish posts to your blog, something we definitely don’t want.
How do you create this special email address in Jetpack? This is the easiest part. Link Jetpack to your WordPress.com account and then activate the Post by Email module in the settings. After this, navigate to Users –> Your Profile on your admin menu and click Enable Post by Email. Save your changes by clicking Update Profile at the bottom of the screen.
This simple process arms you with a special email address that, if you’ve forgotten, must remain only known to you and/or your trusted authors.
With your special email address in hand, it’s time to compose, format and send/publish your first post vie email. Don’t pop the bottles yet, we have a long way to go ;).
Fire up your favorite mail client (I love Gmail for business. Thank you Google Apps) and start composing your blog post. The title of your blog post goes in the subject field of your email and the post’s content goes in the body of your email – just like a typical email. Of course, once we’re done composing and formatting the post, we will send it to that special email address we generated earlier, so copy it in the to field.
Formatting Your Post From Your Email Client
After composing, you can format your posts before publishing but only if your email client supports HTML or rich text formatting. If your email client does not support rich text/HTML, you will have to send your posts to the drafts folder and format them later on, which, if you ask me, defeats the whole purpose of publishing blog posts via email. Good thing most web-based email clients support HTML and rich text formatting, so you ought to be covered in this regard. I will encourage you to create an email account with a web-based email provider (e.g. Gmail, Hotmail etc) to take care of formatting.
However, you should be aware that the Post by Email feature will strip off some of your custom formatting, meaning your posts will look slightly different from what you have in your email client. The general rule of thumb here is to keep the formatting to a minimal or follow some of the lessons I learned when I played around with this feature on a test blog.
Lessons I Learned
After sending my first test post and waiting for up to twelve (12) minutes (more about this in a second), I realized the Post by Email system stripped off inline images and attachments but retained bold, italics and all links. I had to wait for about twelve (12) minutes because WordPress.com had to decided what to do with my attachment, which was rejected for being an invalid file type.
I had attached a .LOG text file and WordPress.com must have a hard time trying to work around that. I decided to try different file types. I run a second test post and attached a MS Word document and a .png image. This time, I added the image from the web (using a web URL) instead of just adding it directly into the email.
The second test post showed up in my Posts Screen almost immediately. This time, the image was not stripped off but the attachments were not as lucky. I expected the attachments to show up at the end of the test post but in their place, there were two “shortcodes”, [attach1] and [attach2]. I had activated my galleries, so don’t even go there. I later found my attachments in the Media Library. Comparing the two test posts, this was some progress!
Main Takeaway:
- Some file types such as files ending with .LOG will be rejected automatically and delay your post for about ten (10) to fifteen (15) minutes
- Attachments are sent straight to the Media Library
- Images will only show in your posts if you insert them as web URLs. All images you add directly into the body of your email will be stripped off or ignored
- I don’t know the criterion the guys over at WordPress.com use but some of my test posts were sent to the drafts folder while others were published immediately (I compared the two and came up with our next point)
- Well formatted posts are published immediately (posts with valid categories, tags, attachments and web URL images)
Now that we’ve just found out that all attachments are sent to the Media Library, and all inline images are ignored, what happens to other extras such as your email signature? Will it be published on your blog alongside the post? Well, no. The Post by Email system will remove any email signature that utilizes the standard signature pattern of dash dash space (– ). Additionally, the Post by Email system will get rid of anything after the <hr/> tag.
Using Shortcodes to Customize Your Posts
I had a wide satisfactory smile (more like a grin) on my face after testing shortcodes. After a short while and without breaking a sweat, I learned you could add categories, tags, excerpts, slugs, polls, delay your posts for hours or days, and turn comments on and off among other things. Here is a list of the available shortcodes:
- [title Your Desired Post Title] – Sets your post title in case you cannot access the subject field from your mobile device
- [category a,b,c] – Adds categories a, b and c to your post. E.g. [category Recipes, How-To] will assign categories Recipes and How-To to your post
- [delay +1 hour] – This shortcode will instruct WordPress to publish your post after one (1) hour. [delay +2 days] means your post will be published after two days
- [end] – Everything after this bad boy is ignored. Put it at the very end of your post with a blank line above it. This is the only shortcode you can’t use anywhere else in the body of your email. You can place any other shortcode wherever in your email except the subject field of course 😉
- [tags a,b,c] – Adds tags a, b and c to your post
- [excerpt]Your excerpt goes here…[/excerpt] – This shortcode adds an excerpt to your post
- [slug add-your-slug-here] – Adds a slug to your post. A slug is a browser and SEO friendly URL of your post
- [comments on | off] – Turns comments on or off
- [nogallery] – Deactivates the gallery and displays all images inline
- [[slideshow]] – Turns your gallery into a slideshow
- [more] – Works just like the more tag
- [poll] Quiz and answers[/poll] – Adds a Polldaddy poll
- [nextpage] – Allows you to paginate your blog post
- [publicize off | yahoo | twitter | facebook] – Allows you to set your publicize options. For instance, [publicize off] disables the publicize feature for that particular post, and [publicize twitter] sends notification to your Twitter account only
- [status publish | pending | draft | private] – What do you think this does?
Note: You must write all shortcodes in lowercase.
Post by Email in Jetpack: Extras
Just a bit more you should know. Users with Administrator, Author and Editor roles can publish WordPress blog posts automatically just by sending the post to your special email address. Users with Contributor privileges cannot publish to the blog automatically. All their submissions will be pending review. Moreover, each user can create their own secret email address. The more the merrier, right? Haha.
Advanced Post by Email Settings
Like to get your hands dirty? Love looking under the hood? Looking for an alternative method of publishing your WordPress blog posts via email? Perhaps your Post by Email Jetpack module is broken or you just don’t like Jetpack since it slows down your website. Or maybe, the simplicity of the Jetpack option doesn’t interest you. This section is exactly what you’ve been waiting for.
This second method of publishing posts via email relies on the post by email feature that is part of the WordPress core. According to WordPress Codex, this built-in feature is “…deprecated and will be removed in an upcoming release.” I don’t know when they made this announcement but that’s one more reason you should embrace the Jetpack option or use plugins. Either way, let’s configure mail servers and open up some ports for we will need these settings when working with plugins 🙂
First login to your web hosting account and create a new email account. In a majority of web hosting accounts, you will find this option by navigating to cPanel –> Email Accounts. Creating an email account by itself won’t help you much, you need to add it (the email address) to your WordPress website. Armed with your new email, go to Settings –> Writing and scroll down to the Post via Email section. It’s time to configure your mail server.
Enter the details as shown below:
- Mail Server: Enter your domain name
- Port: 110
- Login Name: Enter the email address you created above
- Password: Enter the corresponding password for the email address above
Are you with me? There is one more small step. You have to visit www.yourdomain.com/installdir/wp-mail.php to parse posts every time you publish using this email account.
Where:
- yourdomain.com – your domain name
- installdir – the path to your WordPress installation. Skip (eliminate) this if WordPress is installed in the public_html folder
Note: Calling wp-mail.php manually is cumbersome, not recommended and will be deprecated soon. Here is an alternative. Add the following code to your functions.php file to check for email every fifteen (15) minutes:
function retrieve_post_via_mail() {
flush(); // Display the page before the mail fetching begins
if ( get_transient( 'retrieve_post_via_mail' ) ) {
return; // The mail has been checked recently; don't check again
} else { // The mail has not been checked in more than 15 minutes
do_action( 'wp-mail.php' );
set_transient( 'retrieve_post_via_mail', 1, 15 * MINUTE_IN_SECONDS ); // check again in 15 minutes.
}
}
add_action( 'shutdown', 'retrieve_post_via_mail' );
All posts you publish using this method will be sent straight to the drafts folder. However, you can choose to automatically publish posts without admin approval in your WordPress settings. It’s all up to you ;).
WordPress Post by Email Plugins
And here comes the plugins! We all love plugins, don’t we? You know, they are super useful, easy to install and fun to use especially when you don’t have to configure a million and one options. The post by email plugins I found all have one thing in common: they seek to replace WordPress’ Post by Email feature that will go bite the dust sooner or later. The major difference is each of these plugins offers you more functionality as far as publishing posts via email is concerned. Posting via email should not be a challenge when you put any of the following plugins into good use.
Postie Free WordPress Plugin
According to Wayne Allen, the plugin author, Postie gives you the power to publish blog posts via email with added advanced features you won’t find in the core WordPress post by email option. With an impressive rating of 4.3/5.0 and over 225K downloads, it’s safe to argue that Postie is picking up quite the momentum. Or maybe, people just love this plugin because it offers you the ability to add pictures and videos via email, strip off email signatures automatically, assign categories and do a whole lot of other cool things. Postie supports POP3, IMAP and SSL.
Post By Email Free WordPress Plugin
Developed by Kat Hagan, Post By Email has a shinning rating of 4.4/5.0 while still in beta stage. The plugin offers a couple of nice features such as support for POP3 and IMAP servers, SSL so your emails are secure, PIN-based security to discourage email spoofing, access to WordPress’ built-in roles, assign tags, categories and custom taxonomies, ahortcode functionality, etc. Just install the plugin, configure a few options (just like we did in the previous section) and your work is done!
After hours of looking hard, my search turned up only these two plugins and an online service called Posterous that is no longer available. Disgruntled much? Don’t be, you just need one of the plugins and you will be alright.
This ball is now in your court…
Have you ever published WordPress blog posts via email? What are some of the lessons you learned? Are you aware of other post by email WordPress plugins? Please share your thoughts with us in the comment section below. Happy posting!