Posting with Postie

Since ditching my Pearl for an iPhone, I wanted to try out the whole blog-by-mail thing. I wasn’t really happy with the configuration options of WordPress’s built-in by-mail feature, so I tried out Postie. It’s been fun to play with and works well, but I ran into a snag and wanted to share the solution.When you post via Postie, you send mail with attachments (images, video, whatever) to a special account. Postie will fetch this mail on demand by POP3, format the post content, and submit it via WordPress’s post submission routines. Postie will do neat things like create thumbnails for your images and link these thumbnails to full-sized copies. These images and other content are given CSS classes so you can tweak their display as you wish. Very nice!The trick is that you need to hit a URL (get_mail.php) for your mail to be processed and posted. You can request it manually in any old web browser, use cron (for example) to hit it automatically, or use a “Cronless Postie” feature that the current author provides. I chose the cron approach since it could give me a bit of a sense of server downtime by its failure messages.What I didn’t notice until I applied some styles to these generated CSS classes was that if you request get_mail.php with a client that isn’t cookied (including my use of wget via cron), WordPress will filter out all HTML tags’ attributes in the post’s content. You’re left with no CSS classes, no Javascript for spiffy thumbnailing, no nothing … just some extremely simple markup that will get you by, but probably isn’t what you want.After some experimenting, I found that the client that requests get_mail.php must be recognized as a blog user with either Editor or Administrator access if you want this extra markup to come through. This doesn’t appear to be Postie’s fault, unless this is a bug in its “Roles that can Post” option, but may be a result of some inner WordPress authentication magic. Note: I have comments turned off on tigerbears.com, so it’s possible that you might have less stringent requirements. Good luck!