It’s a simple request:
“Dear WordPress, if I send you an email, would you be kind enough to post it?”
Unfortunately, it’s not a straight-forward answer.
Following is a collection of settings, tips, and tricks to help you understand WordPress’ built-in “Post via e-mail” settings.
Armed with this information, you might enjoy posting via email, or you may decide not to bother with it after learning its limitations.
WordPress Core (wp-mail.php)
In order for new posts to be created, the wp-mail.php script needs to be visited manually (type site.com/wp-mail.php into your browser after a new e-mail message has been received), loaded via iframe in your site’s footer, called in your functions.php, setup as a cronjob, or otherwise activated. If you don’t load wp-mail.php, the e-mail inbox won’t be checked (i.e. no new posts).
Featured Plugin - WordPress Newsletter Plugin
Post via E-Mail General Tips
- Each email message will create a new post, with the subject line as the post title and the body of the email as the content of the post.
- However, only plain text messages are received. If not sent in plain text, the entire e-mail body content is ignored. Even if you email in plain-text, if you attach a file, the e-mail body will be ignored. If sending from a mail program, like Apple Mail or Outlook, the text may come through, depending on how the message is sent.
- If you have Re: or Fwd: in the subject line, it will get picked up. No common email strings are ignored.
- You can use a double-colon “::” as an indicator of where you want the WordPress content to end or start.
- Example e-mail subject line = “before :: after”
- The new post’s title = “before”
- Example e-mail body (plain text) = “before :: after”
- The new post’s content = “after”
- If the email message was sent from an email address that matches a user account that has posting permissions, it will be Published with that account as the author.
- If the email message comes from an email address not matching an existing account or an existing account with posting permissions, it’ll be saved as Pending, not Published, and the Administrator with the lowest user ID will be assigned as the author.
- The first time wp-mail.php runs, it pulls in all of your mail, including that initial “welcome to your new email account” message that you didn’t delete.
- When checking for mail manually, by typing in /wp-mail.php to your browser, you’ll see the results or an error message.
- If your POP3 settings are incorrect, you’ll receive an error message stating this.
- Otherwise, if correct, you’ll see a list of the emails imported as posts and the email address each was received from.
- If you check more often than once every 5 minutes, you’ll receive the message, “Slow down cowboy, no need to check for new mails so often!”
- Post via e-mail does not work in a WordPress MultiSite setup
WordPress GMail Settings
How to setup WordPress Post via e-mail settings for any GMail or Google Apps email address:
- Mail Server = ssl://pop.gmail.com
- Port = 995
- Login Name = full email address (e.g. firstname.lastname@example.org or email@example.com)
- Password = password (Note: it will be displayed in plain text within your wp-admin Writing settings page so make sure you know which users have access to this page because they will be able to login to your email)
- Default Mail Category = your choice
GMail and Google Apps users, this info is for you:
- GMail’s firstname.lastname@example.org (learn more) doesn’t work. It’ll pull ALL your mail at the email@example.com location.
- WordPress’ wp-mail.php pulls from GMail’s “All Mail”, not the GMail “Inbox”. So archiving a message won’t stop WordPress from finding it. You’d have to delete it from “All Mail” first, since this is where GMail’s “real” copy of the message is stored.
- If sending from a smartphone’s GMail app, it will not post the message content, in my experience. If sending directly from web-based GMail, you have to select “Plain Text” (to the far right, under the subject line) in order for text to appear in the post’s content area.
Should you use wp-mail.php?
Now that you know only plain-text emails can be received, that the email account information is stored for all other Administrators to see, and that MultiSite is not supported, is it even worth using?
In my opinion, no.
Posting via e-mail is a great idea, especially for users intimidated by the WordPress Dashboard or for posting email newsletters from that great community group you belong to, where you’re the point of contact and tasked with spreading the information.
However, due to the limitations, I would suggest you login to the Dashboard and create a new post manually, copying the email text and uploading the images/attachments as you see fit. Alternatively, if looking for a mobile-friendly posting experience, use the WordPress app.
I hope I saved you hours of testing — setting up a random email address, tweaking settings, testing mail messages, waiting 5 minutes between email checks, and more — just to realize these limitations.
If you have a great way to post via email — one that “just works” — please share your comment below.