Post by Email is a way of publishing posts on your blog with an email address. Any email service can be used to send email to this address, allowing you to quickly and easily publish from devices where the WordPress app may not be installed.
You can enable the Post by Email feature from Jetpack → Settings → Writing → Publish posts by sending an email in your site’s WP Admin.
Continue reading for more detail, or click on a section below to be taken directly to it.
- Creating an email address
- Sending emails, formatting emails, and removing signatures
- Adding attachments and using shortcodes
- Adding categories and tags
- Changing your Publicize settings
- Inserting polls
- Delaying posts
- Providing post titles and changing post status
- Example email with shortcodes
- Can I use PHPMailer or another PHP script?
Creating an Email Address
Posting by email requires an email address to post to, not from. This should be a secret address that only you know, otherwise, anyone who knows it can submit content to your site. Jetpack provides suggestions for a secret address under Jetpack → Settings → Writing → Post by Email when clicking the ‘Create Address’ button:
Jetpack will generate a random address like the one below. Do note use this address for your own site:
Each click of the ‘Regenerate address’ button will generate a new random address. Once you see an address you like, leave it in place, and your site will be ready to receive posts by email.
Publishing a post by email is straightforward. Please note that you can only post by email to one site at a time.
When writing a new email the subject line will be used as your post’s title, and the email body will be used as the post’s content. If it’s not possible to provide a subject line a shortcode can be used instead (explained below).
Your email can be plain text or formatted. Be aware that the Post by Email system will strip any HTML tags that it thinks will interfere with a post’s display on your site. For example, italic and bold formatting will be retained, but colour and font changes will not.
Note: when posting by email you will need to use an email client that supports rich text or HTML formatting in order to make use of formatting. Most website based clients support this, as do most desktop clients. Keep in mind that you may need to switch your client into rich text or formatted mode.
When posting by email, signatures that match the standard signature block pattern will be automatically removed:
dash dash space)
Posting by email will also remove anything after a
<hr/> HTML tag, and will attempt to clean up cellphone network signatures as well.
If your email system attaches a signature that does not match any of these patterns then you can manually tell Post by Email to stop including the signature by adding a special
[end] shortcode on its own line, with a blank line above it. Content after this shortcode will be removed from your post. Alternatively, if your cellphone network is adding a signature and you want us to remove it, then let us know the details and we’ll be happy to take a look.
Image attachments will be included in your post as follows:
- Single images will be displayed inline (a single image is defined as an image without another image immediately following it).
- Multiple images will be displayed as a gallery.
Multiple galleries and single images are allowed in the same post. You can use the
[nogallery] shortcode to disable all galleries in a post.
Shortcodes can be embedded in your email to configure various aspects of the published post. The following shortcodes can be used when posting by email:
[delay +1 hour]
[comments on | off]
[status publish | pending | draft | private]
[title Your post title]
[end]– everything after this shortcode is ignored (e.g. signatures). If you use this, make sure it’s on its own line with a blank line above it.
[slideshow]– replaces the auto-gallery with a slideshow
[nogallery]– disables the auto-gallery and displays all images inline
[more]– see more tag
[nextpage]– see pagination
[publicize off|yahoo|twitter|facebook]– change Publicize options (see below)
Shortcodes can be included anywhere in the body of your email and must be in lowercase. There should be no spaces between the left square bracket and the shortcode content.
The category shortcode allows you to add existing categories to your post, or create new categories. Categories must be comma separated.
[category holidays, main-dishes]
Note: it’s possible to add categories by matching existing category slugs. For example, ‘main-dishes’ may add the ‘Main Dishes’ category if it exists. If the ‘main-dishes’ category did not exist, however, then a new category with the slug and name ‘main-dishes’ would be created instead.
As with categories, any number of tags can be added to your post, each separated by a comma. You can add existing tags, or create new ones.
[tags one potato, two potato, three potato, more]
In this example, four tags will be added to your post: ‘one potato’, ‘two potato’, ‘three potato’, and ‘more’.
Changing a Post’s Publicize settings
Jetpack’s Publicize feature lets you notify other web services about your posts. With the
[publicize] shortcode you can control this from Post by Email.
Note: your Publicize settings must have been previously configured for these shortcodes to work. Importantly, if you have already configured Publicize and don’t include these shortcodes in your post, then it will be Publicized to all of your connected Publicize accounts.
The following Publicize shortcodes are available:
[publicize off] – disable all Publicize notifications.
[publicize twitter] – only send a notification to Twitter.
[publicize twitter]my new post[/publicize] – only send a notification to Twitter and set the Twitter status to my new post.
[publicize twitter facebook] – Sends a notification Facebook and Twitter only.
Note: if you use more than one
[publicize] shortcode in your post (for example, both
[publicize twitter] and
[publicize facebook]), only the second shortcode will be used (in this case,
[publicize facebook]). If you want to Publicize to only these two services, you need to use a combined shortcode, like
[publicize twitter facebook].
Delaying Your Post
The delay shortcode will accept any time allowed by PHP’s strtotime function. For example, you can use the following to delay your post by one hour, or two days, respectively.
[delay +1 hour]
[delay +2 days]
Providing a post title
By default, the title of your post will be taken from the subject line of your email. In some instances, such as when sending an email from some cell phones or via a MMS-Email gateway, you may not be able to provide a subject. In these cases, you can set your post title from inside the email with a shortcode:
[title My Fancy Post]
This will set the title of your post to ‘My Fancy Post’.
Changing Your Post Status
Sometimes you may want your post to be private, or to be reviewed by yourself or someone else before being published. To do this, you can use the
[status] shortcode to set the post status.
This will post your content with a ‘private’ status.
Example Email with Shortcodes
The following email will be published in two days’ time to the “WordPress” category, with the tags “announcement” and “WordPress”:
Welcome to Post by Email, the easiest way to blog!
[tags announcement, WordPress]
[delay +2 days]
Can I use PHPMailer or another PHP script?
No. Our anti-spam controls will always block posts from PHP scripts, including PHPMailer. The post by email feature is only available for email clients.
This feature is de-activated by default. It can be activated any time by toggling the Publish posts by sending an email in the Post by email section from Jetpack — Settings — Writing in your dashboard.
|Site Owners / Users
This feature utilizes the local ID of the user configuring or publishing via this feature. This ID is used to check for an active Jetpack connection and actually create/update the email address for posting.
Additionally, for activity tracking (detailed below): IP address, WordPress.com user ID, WordPress.com username, WordPress.com-connected site ID and URL, Jetpack version, user agent, visiting URL, referring URL, timestamp of event, browser language, country code.
|Site Owners / Users
We track when, and by which user, the feature is activated and deactivated. We also track when, and which, configuration settings are modified.
|Data Synced (Read More)|
|Site Owners / Users
We sync options that identify whether or not the feature is activated and the configured email address used exclusively for posting content.