Blog By Mail With Categories
I really like the Blog By Email functionality of WordPress. The only missing feature, I found, was the ability to to tag the email with a category of my choice*. I looked around and couldn’t find anything, so I added some functionality myself.
Instructions:
1) Before you do anything, I strongly suggest that you make a backup copy of your wp-mail.php file. Call it something clever like, oh, “wp-mail.bak” or something like that.
2) Did you do step one? Sure? Ok, now download this …
…and put it your blog’s home directory. You’ll notice that it’s a TXT file. You should rename with a PHP extension and change the permissions accordingly.
3) Send an email to the Blog By Email account you’re using as you have before but now, if you want to use something other than the default category, include the post category in the subject line using square brackets like this:
“Here’s a new post! [myCategory]”
4) Either make a request of wp-mail.php or wait until your cronjob calls it to see the results!
* Right now, you can only include one category. A post tagged with multiple categories is slated as the next challenge and is in the works.
DISCLAIMER: I’ll try to get back to you if you have any questions about my code. Bear with me if it takes a while as I don’t have much time for support.
2007-12-15 UPDATE: This wp-mail file has been updated to work with WordPress 2.3. If you’re using WordPress 2.0, you’ll need this version of wp-mail instead.














