Hanging out in the #wordpress IRC channel yields a great many questions. Some interesting, some not. Late last night, while I was trying to configure my server to use PHP’s new PHP Data Objects, someone asked this question:
How can I use a Gmail account to post new entries to WordPress?
Basically, the idea is to configure WordPress so that when you send an email to a Gmail account, WordPress picks up that email and turns it into a post.
Oddly, this is functionality that is built into WordPress, but is what WordPress provides enough to get the job done?
I’m going to set up a Gmail account for posting to a new blog on a redalt.com subdomain. Let’s see how it works.
First, I guess I need a Gmail account. If you’re not web-savvy, Gmail is a service that is run by Google (ok, if you’re reading this and you don’t know what Google is, maybe you should stop reading right now) that provides free email and email storage for its users.
Head over to Gmail to sign up for an account. The current signup process requires that you enter a cell phone number so that Google can text you an activation code. Alternatively, you can ask a friend who has a Gmail account to send you an invitation code.
When you sign up for the account, the name of the account doesn’t need to be anything specific. It doesn’t need to contain the name of your blog. It could be a random string of letters and numbers. WordPress won’t care.
Assuming all goes well with your Gmail account setup, you should be able to log into your Gmail account to configure your POP settings.
Post Office Protocol, or POP, is the protocol email programs use to download messages from the mail server. WordPress will function as a very simple email program, and download your messages to produce new posts. You must configure Gmail to allow POP so that this is possible - it’s easy.
After you’ve logged into Gmail, click the Settings link at the top right corner of the page. When the settings page appears, Click the Forwarding and POP tab. On that tab, you’ll see the setting to enable POP for all mail. There is also a setting for what to do with messages on Gmail when they’ve been downloaded. I suggest setting this to “Archive”, but I don’t think it matters for our purposes. When you’ve got POP turned on, Save Changes and you’re done with Gmail.
Next, we’ll need to configure WordPress to download mail from Gmail. The trouble is that WordPress’ POP support is only POP, not the SSL (secure) POP that Gmail requires that you use. Well, that’s a bummer, isn’t it?
Don’t fret - there is a solution.
You will need two things. Your server must have PHP compiled with IMAP which must be SSL-enabled. If you have this (and there’s a good chance that you do), then you will also need a new WordPress plugin - Postie.
Download Postie from the installation page, and
First, log in to your WordPress admin console. Choose t