And some other information you might find useful.
I finally upgraded my personal blog to the latest version of WordPress, which is version 2.2.2 (as I write this). In addition to breaking a handful of my plugins — not a big deal, since I was able to replace just about all of them with newer, better versions — it also broke WordPress’s post by e-mail feature, which we discuss on pages 64-66 of our WordPress book.
The Post by E-Mail Feature and How It Broke
If you’re not familiar with this feature, you might want to be. It’s pretty cool. It enables you to send an e-mail message to a special account you set up for WordPress to check. When WordPress finds a message there, it automatically posts the content of the message to your blog, using a predefined category that you choose. The message subject becomes the post title.
In WordPress 2.2, WordPress simply stopped seeing and importing the body of the message. As a result, you’d wind up with properly titled but otherwise empty post.
Some research on WordPress.org uncovered a post which explained the problem and offered patch code for the
class-pop3.php file. This file, which resides in the
wp-includes folder of a WordPress server installation, is responsible for processing posts by e-mail.
I manually replaced the bad code with the new code in my file and tested the results. It worked fine.
Rather than fiddling around with code like I did, you can simply download the revised file here. UnZip it and use it to replace your current
class-pop3.php file. (If you’re smart, you’ll save a copy of your current file — perhaps by renaming it right in the folder in which it resides — before replacing it.)
This file definitely works on my WordPress 2.2.2 setup. It might not work with earlier or later versions of WordPress or on your setup if it has been heavily modified, so try it at your own risk.
A Neat Trick
While I was researching the problem, I picked up a neat trick in the WordPress Codex.
If you use post by e-mail, you probably know that your e-mail messages won’t be posted unless WordPress checks for mail. As we wrote in our book (on page 66), there are at least two ways to do this: manually by opening a specific Web browser page or automatically using a plugin.
But there is another way to automate the process and it’s pretty easy for WordPress novices who aren’t afraid to roll up their sleeves and modify a template file. Simply include the following code in your theme’s
This forces WordPress to check for mail every time someone loads any page on your site.
The drawback to this is that if your site is very busy, your server will be checking pretty often for e-mail messages. But it seems to me that you could include the same code on another template page that’s used less often, perhaps
category.php (if present) or
Hopefully, you’ll find this information useful. As usual, comments are welcome. Use the Comments link or form below to share your thoughts with me and other visitors.