WordPress has a sufficient, mostly responsive, back-end and great applications for mobile devices, but there might come a day when you'll just want to send an email to post an entry to your website.
In this post, we're going to go through this handy little feature of Jetpack: Post by Email.
WordPress has a Post via Email functionality in its core, but it's far from being handy or user friendly.
As the Codex says, you have to:
- Create a dedicated e-mail account to be used solely for posting to your blog
- Configure WordPress to access that account via POP3
- Configure WordPress to publish messages from that e-mail account
And even if you do, you're stuck with plain text posts and you can't post any email attachments!
Plus, you have to at least set up a function in your theme (or as a separate plugin) for WordPress to recognize your email as a post. Oh, did I mention that you can only select one category to post and you can't set any tags or any other kind of taxonomy?
Luckily, this problematic approach can be replaced with Jetpack, another creation from Automattic. The Post by Email module solves all the problems above and allows you to do lots more. In short, you can:
- Use HTML in your email
- Include attachments (and include the attached images as a slideshow or an inline gallery)
- Set a title (and a slug) different than your email title
- Set categories and tags
- Turn on or off comments for the post
- Set an excerpt
- Change the status of the post
- Set a password for the post
- Set a time for the post to be published
<--nextpage-->tags inside the post
- End your post anywhere inside your email
- Include a PollDaddy poll
- Turn off geotagging
- Set Publicize options, another module of Jetpack
You need to do a bunch of things with Jetpack, too:
- Install the plugin
- Connect your website with your WordPress.com account
- Check if the "Post by Email" module is enabled
- Go to Users » Your Profile and click on "Enable Post by Email"
- Get the special email address and add it to your address book
Notice that you don't even have to use your keyboard while taking these steps - except, maybe, entering your WordPress.com credentials. After doing these in order, you're ready to send your first post via email!
Now that you're all set on your WordPress admin panel, you can now log in to your email account - the one you're registered with WordPress.com. With your first post (and all others, naturally), you can use the following shortcodes anywhere inside your email:
[title Hello World!]
Parameters: The specified title.
If you want to send an email with a different title than the title of the post, you can use this shortcode to set a title for the post. If this shortcode is used, Jetpack will disregard the title of the email.
Parameters: The specified slug.
The usual "slug", the words on the address bar. You can use this shortcode to use shorter URLS like
myblog.com/hawaii-trip/ and avoid huge ones like
[category News, Personal]
Parameters: Comma separated category names or IDs.
You can set any category you want with this shortcode. Just use names or IDs as parameters and you're good to go! It even gets the right category when you don't use the full name, like "Anno" instead of "Announcements".
[tags lorem, ipsum, dolor]
Parameters: Comma separated tag names.
Like categories, you can use tag names
[tax custom-taxonomy]lorem, ipsum, dolor[/tax](where the default parameter is "tag"). Let's hope the module will support this in the future :).
Parameters: "on" or "off".
No need to explain this one: You can turn on or off comments on your post with this shortcode.
Parameters: "publish" (default), "private", "pending" or "draft".
Again, this is self-explanatory: You can set the four parameters to set the status of your post.
Parameters: The specified password.
You can protect your post with a password with this shortcode.
[delay +2 days]
Parameters: a date/time description like "+1 week 2 days 3 hours" or "next Saturday" or "25 November 2013".
Using the strtotime format, you can set the date and time of your post. If you set the parameter to "+2 hours", your post will be published 2 hours after you send the email.
If you're using the "excerpts" of WordPress posts on your website, you can set an excerpt between
Parameters: "on" or "off".
If your phone (or email client) is using your GPS information inside the emails, geotagging will be enabled by default. If you don't want to share that information on your posts, you should disable it by using this shortcode with the parameter "off".
[publicize facebook twitter]
Parameters: Space separated list of services (like Facebook and Twitter) or "off".
Jetpack has another useful module called Publicize, letting you share your post automatically on social networks when it's published. If you want to do the same with email, you can use this shortcode to Publicize your post.
These two are also self-explanatory: If you ever need to use the
<--nextpage--> tags inside your post, you can use these shortcodes.
By default, Jetpack will include your image attachments in the post. If you attach just one image, it will be displayed inline and if you attach more, all of them will form a gallery.
If you don't like this behavior, you can use [nogallery] to display all images inline or use [slideshow] to replace the gallery with a slideshow.
Parameters: "type" (single, multi or a number), "style" (manga or medium), "other" (yes or no).
If you have a PollDaddy account, you can use this shortcode to include a poll inside your post. Here's an example on how to use it:
[poll type="3" style="medium" other="yes"] What are your favorite Tuts+ blogs? (select three) * Wptuts+ * Nettuts+ * Webdesigntuts+ * Psdtuts+ * Phototuts+ [/poll]
There could be email signatures you can't remove (company policy, hmpfh) or your smartphone could add lines like "sent from myPhone" (that company's policy, hmpfh) and you wouldn't want these signatures to be included in your post.
Jetpack automatically cuts out the text after a signature block or an
<hr /> tag, but you can use [end] alternatively to end the post right where you use it.
I always thought that the core "post via email" feature of WordPress was too much limiting, kind of redundant and absolutely hard to use. Now that we went through everything Jetpack's "Post by Email" module can do, I'm glad that there's an alternative to it, also developed by Automattic.
What do you think about this feature - do you plan to use it? Share your comments below and don't forget to share the post!