Tired of banging my head against a wall trying to figure out why WPBlogMail (which sends weekly Birdhouse email updates to subscribers) would choke on 3rd-party WP plugins (but only when run via cron). Plus I wanted to pull digests via lynx, rather than handling everything manually in PHP (lynx –dump has some great formatting options). And I hated the name. Finally decided it was time for an entirely new architecture for the system, so started work on WP-Digest.
Things got a bit funny along the way when I realized users might not have permission to call lynx from PHP scripts on their hosts. Fine, so call lynx and send the mail from a shell script. That didn’t quite work either, because you can’t control the mail headers when sending from shell scripts — mail you want to come from firstname.lastname@example.org might instead appear to come from email@example.com, no way to control that.
The solution I came up with is a combination of two PHP scripts (one to generate the digest and another to send it) and one shell script (to fire off lynx twice). Uses a fun little “token” system to prevent email from being sent by strangers guessing the URLs to the PHP files.
Anyway, the Birdhouse Weekly Updates are now much more nicely formatted, and finally free of weird PHP errors and occasional mis-formatted characters. I’ve basically duplicated the functionality of Feedblitz‘s premium service (or will have once I bake in HTML e-mail support). WP-Digest has its own page in the public WordPress plugins database.
Subscribe to Birdhouse Updates via the form field in the right sidebar.