b2emo first release
I have started a project that is an add-on to b2evolution and eventually other blogging software. It will allow processing of plain text and HTML e-mails sent to a special e-mail address and will post them to any software using the Blogger API.
The web page for the project is http://www.lowbatteries.com/b2emo .
First of all, the name b2emo means nothing, and will change soon.
The basis for this script is Dr. Dave's "WP-keitai-mail Plugin".
I, like Dr. Dave, used Richard Heyes' Mime Decoding class.
I added in parsing of HTML-email using Jan's HTML2XML Parser.
I also took out the hard-coded user prefs, and made it so that username, password, and category were defined in the e-mail like so:
username::joe
password::secretword
category::36
This allows people to post to different blogs, etc, by just pasting different info at the top of their e-mail.
I made attachment handling object-oriented, with mime-types defined as objects. Adding more mime-types with thumbnail support should be very easy. Being able to upload a .pdf and having a .jpg preview would be
awesome, and I hope to implement that soon.
Any inline image in an HTML e-mail will be uploaded like an attachment and will be referenced in the original HTML when it is posted.
Any attached image not referenced in the HTML will be thumbnailed and appended to the end of the post.
Document and error logging/checking is almost completely non-existent in this first script.
I've only tested this using the HTML e-mail generated by Mozilla Thunderbird.
Currently only JPEG pictures are supported, and FTP has not been added.
I want to also add in support for other blog software besides b2evolution.
Any ideas/suggestions or code contributions are welcome.