WordPress post and page editor is equipped with a WYSIWIG editor. We can write and format post as easy as we do it in a word processor application, such as Microsoft Word and Pages. But, WordPress also allows us to write and publish post through email.
There are some occasions where sending post by email can be very handful, e.g. when you accept contribution from others, but you do not want to give out an account for them. So, rather than diving through a bunch of email inboxes, this method allows you to find the post immediately in the WordPress back-end administration.
So, let’s see how it is done.
Recommended Reading: Enabling Infinite Scroll For WordPress Theme
Posting by email in a self-hosted WordPress site is achievable using Jetpack. Ensure that you have installed it, and that the feature is activated, as follows.
Then, go to Profile > Your Profile page, and enable Post by Email. This action will generate a unique email address where you will send the post. Any users with the “Publish Post” privilege, such as Author and Editor, may be required to create their own unique email address as well.
Please be aware that anyone with the email address can publish post to your blog, so you ought to keep this email address a secret.
Alright, we are done with the requirement setup. And, now, let’s head over to our Email app.
Sending out post through email
Write the post content as you would write an email. You can write it in plain text or rich text format, and specify the title of the post in the email Subject. Send it to the unique email address that has been generated above.
Login to WordPress back-end, and you should find that the post has been published. Note that users with Contributors status won’t be able to publish posts immediately; the post that they send will be pending review.
Furthermore, we can use shortcodes for configuring the post, such as whether the post is “published” or it is a “draft”; specifying the post categories and tags; and naming the post URL slug. The following is a list of shortcodes that you might need to include:
- [title Your post title] – you can also set the post title in this way.
- [slug some-url-name] – name the post slug URL.
- [category x,y,z] – specify the post categories. If the categories specified are not present, WordPress will create them for you.
- [tags x,y,z] – specify the post tags.
- [excerpt]some excerpt[/excerpt] – wrap the post excerpt.
- [delay +1 hour] – delay the post publishing time. It will automatically put the post in schedule.
- [comments on | off] – allows or disallows the post comments.
- [status publish | pending | draft | private] – set the post publishing status.
- [password secret-password] – set password for the post.
- [more] – split the post, display only the first part of the post.
- – split the post into pages.
For more shortcodes, check out this post.
There is no restriction on where to put the shortcodes. Here is an example.
Please note that this Post by Mail feature comes with limitations. At the time of the writing, assigning featured image thumbnail and send post to Custom Post Type is not possible.
In addition, I had some trouble when trying to insert images into the post through email attachment. The image is not uploaded and the src URL within the image is filled with random strings and numbers. To solve this, we can use an alternative: by uploading the image separately with the following format address media+[uniqename]@post.wordpress.com.
But if you ask me, Post by Mail is still very handful in certain situations.