John Blade’s Homepage

One man on one island.

wp-mail mod update! Now 0.2!

Comments

Thanks for all the feedback for my last wp-mail mod. I’ve done a lot of bug fixing in this release, and added a few features. Still working on improving though, so let me know how you guys go with this version!

Here’s the new version: Thanks for all the feedback for my last wp-mail mod. I’ve done a lot
of bug fixing in this release, and added a few features. Still
working on improving though, so let me know how you guys go with this
version!

Here’s the new version:wp-mail-0.2.zip

<rip from README-wp-mail.php>
Wordpress 1.2 - wp-mail hack
Released 2004-08-26 - Version 0.2
By John B. Hewitt - blade@lansmash.com
Blog: http://blade.lansmash.com

License
-=-=-=-=-=–
It’s GPL! Credits are in the wp-mail.php code.

Introduction
-=-=-=-=-=-=-
This hack is a ‘drop in’ replacement for the current wp-mail.php. It uses pear as a mime compliant email ‘decoder’. What’s cool is that you can attach images inline in your email messages and they’ll be shown as an image in your wordpress article. It does this by decoding the image attachments and writing them to ‘wp-photos’ directory (not in default wp install).

History
-=-=-=-
* Version 0.2 - 2004-08-26
* - Stopped using pear body decoding in favour of own decoding (may be slower but more modifiable) because of enriched text decoding
* - Added base64_decode checking (may help mobile phone users)
* - Fixed Subject line for non-english users (htmlentities instead of just trim)
* - Fixed error in some pop hanging -> more graceful exit on event on no emails in inbox ($pop3->quit)
* - Added work around for email addresses with exta <> in field (ie: <blade@lansmash.com> instead of blade@lasmash.com
* - Added some ===basic=== enriched text support
* - Updated readme file for easier install
* - Easy modify of globals (such as photosdir and filesdir)
* - Cleaned up some pear stuff in install
*
* Version 0.1 - 2004-06-20
* First release (was released under version 1.0 initially, oh boy was I silly)

Features
-=-=-=-=-
It has all the abilities of the current wp-mail.php plus:
- Allows image attachments (posts inline! Main reason I built this mod!!)
- Checks if user email address is in the database (otherwise discards message)
- Allows other file attachments (zip’s, exe’s, etc)
- You can post to various categories (ie, 1 = General)
- Fairly good cleaner for removing excessive line breaks

Would love to see it in the wordpress core
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
I’m planning on more updates, but would love to see this update included in future wordpress releases. Would be happy to maintain it to, I’m fairly sure it complies with most of the coding guidelines I’ve read on
the wordpress coding standard.

Install
-=-=-=-=-
To install you grab the zip file.
- - Drop the two files (wp-mail.php & mailmimedecode.php & PEAR.php) into your wordpress 1.2 root directory
- - Create the directories ‘wp-photos’ and ‘wp-filez’ in the wordpress root directory (with writing permissions (probably 0777).

That’s it. You should now be able to post email to wordpress.

Features to come
-=-=-=-=-=-=-=-=-
Immediate features to come:
- Direct email script that parses email as it comes in (so removes cronjobs)
- GPG/PGP signature verification
- Better enriched text support (only basic stuff at the moment)
- Better security for file attachments (no .php stuff, less l33t hax0rs)
- Look ups for Category posting

Usage
-=-=-=-
You can use the wp-mail hack just like the old wp-mail.

Make sure you change your email client to use HTML encoded messages, that way you’ll get a better looking post that is similar to what you emailed.

When emailing to your blog you can also change the category the post is going to. To do so change the subject line to include [1] at the beginning where one is the number of the category you want to post to.
1 is usually General’s category, so if I want my email to go to the General board I type:
Subject: [1] This is a test

FAQ
-=-
- If you are using Mozilla (thunderbird,etc), use HTML mail! Not HTML/TEXT combined! (One day this script will be able to decode both at the same time, just not today)
- If you are using Outook/Outlook express, use HTML mail!
- If you are using Mac OS X email, you’re sweet
- You can change the default photos and files directories. The variables are on the top of the wp-mail.php code.

Written by JB Hewitt

August 26th, 2004 at 8:50 am

Posted in Code

Viewing 87 Comments

 

Trackbacks

(Trackback URL)

  • Hiilihappoa » Kotisivut

    2004/1/9 at 7:11 pm

    [...] vaviesteillä päivitys onnistui muutaman tunnin puurtamisen jälkeen kun olin ensin löytänyt wp-mail.php ohjelman muokatun version. WWW-palvelimen ja ...

  • Nate Ritter: Web Chef » Posting via Email + Update Notify

    2004/4/9 at 5:51 pm

    [...] the site had been updated. To solve this, I installed the Update Notify plugin and use a modified ...

  • indi.ca » Email Posting, Radix, DNA, Molecules, and Religion

    2004/5/10 at 8:13 pm

    [...] trying to hack a hack of Wordpress into the website they want. There's a really excellent email-to-blog plugin ...

  • Graham Doel's Blog » 2004 » December » 29

    2004/29/12 at 8:18 am

    [...] I have been struggling with the Wordpress e.mail to blog hack of wp-mail.php from John Blade . The ...

  • Graham Doel's Blog » 2004 » December » 29

    2004/29/12 at 8:23 am

    [...] I have been struggling with the Wordpress e.mail to blog hack of wp-mail.php from John Blade . The problems ...

  • Graham Doel's Blog » 2004 » December » 29

    2004/29/12 at 8:26 am

    [...] I have been struggling with the Wordpress e.mail to blog hack of wp-mail.php from John Blade . The problems ...

  • Brian Donovan's Self-Assembly » Moblogging update

    2005/20/1 at 11:59 am

    [...] to “draft” mode, then back to “publish". At the moment, I’m using John Blade’s replacement wp-mail and it’s ...

  • L'Espace Eauxigènes - blog » email plugin

    2005/30/1 at 12:31 pm

    [...] is, pour l’instant, il n’y a pas de redimensionnement automatique des images. Le plugin utilisé ...

  • BSL/ESL » WP/MT/PM

    2005/1/2 at 5:40 pm

    [...] nt release. The new photo email plug-in (0.3) doesn’t work for me so I am using the older ...

  • weblars.de / blog

    2004/26/8 at 7:58 pm

    Moblogging mit Worpdress John Blade hat eine neue Version seines wp-mail-Hacks veröffentlicht. Der Hack erweitert die Fähigkeiten von Wordpress, die das ...

  • tomblog

    2004/20/10 at 3:21 am

    Mobile Blogging! Es ist soweit. Nachdem ich lange auf der Suche nach einem geeigneten Webspace-Provider war, starte ich heute mein Weblog. ...

  • Sascha Carlins Linkdump

    2004/25/10 at 9:51 am

    This page has been linkdumped Sascha Carlin thought this page could be useful, so he sent it to his linkdump.

  • Notizen fuer Geniesser

    2004/28/11 at 12:35 pm

    Mobil bloggen mit Wordpress 1.2 Mingus Bloggen macht Spass! Mobiles Bloggen per E-Mail und über ein Foto-Handy bringt erst richtig Spaß! ...

close Reblog this comment
blog comments powered by Disqus