Menu

#9 email to blog plugin

open
nobody
New plugins (4)
5
2003-12-22
2003-12-22
Dean Smith
No

The following is a first draft design document for an
email to blog plugin. We need discussion on the
implementation of the email format standard and...

Specification
A simple plugin that would scan an email address and,
on identifying a correctly formatted and secured email,
post the contents to the blog.

Functionality - receiving email
1. Scan for email
The plugin would scan a POP mailbox. Emails formatted
as follows will be processed:
Subject: (any subject line to a maximum length of 160
bytes)
Body: a. ##password##
b. Message
c. Attachments

2. Process email
If the ##password## field matches the mail2blog
password, the email is processed as follows:

metaWeblog.newPost (blogid, username, password,
struct, publish)

blogid = the default blogid for this blog
username = the username for this blog
password = the password for this blog
struct as follows:
title = email subject line
description = text from message body
author = the author for this blog
category = the category for this mail2blog entry
enclosure = attachment as media object
enclosure as follows:
url = url where the attachment was uploaded
length = attachment size in bytes
type = MIME type (e.g. image/jpeg)

3. Log entry
Optionally, create a log entry to identify that a post
was made.

Functionality - administration
1. Configuration
A simple screen to allow the user to default the
following options:
blogid = the default blogid - this might not be required,
depending on how bBlog currently implements this
title = default title if none is specified
author = the default author - this might not be required,
depending on how bBlog currently implements this
category = pick a category for all mail2blog entries
upload path = specify the upload path for all media types

2. Logging
Another screen to view posting time - this could be
totally pointless, because once posts are published,
they can be managed via the standard bBlog admin page.

Requirements
1. Existing bBlog setup - which requires:
a. PHP
b. MySQL
c. Knowledge of setting attributes on a server

2. POP3 email address
This is the main restriction for anyone wanting to
implement a mail2blog gateway on their own - hosted
sites have their own solutions. It HAS to be a different
account, because firstly you want reduced traffic to it
(rather than using your main account), which will reduce
the load on the plugin when it has to analysis the
emails, and secondly to reduce the chance of discovery
and therefore spam. For example, I'd use something like
blogmorph@kiwanonet.org for mine.

3. Full implementation of the MetaWeblog API
Dealing with enclosures as part of the MetaWeblog API
is the key to the success of this plugin.

Problems
1. Security
The implementation requires security. The embedding of
a password in the message body is the only option I can
think of. However, the password would be transmitted
to email in cleartext. This is not a major problem,
though, because it is just the password for the plugin
rather than the website. I strongly support the idea of
using a password, to avoid any issues with posts from
anyone appearing on your blog.

2. Camera Phones
If a camera phone only allows a picture and limited text
as a caption, and the password field eats into that text
allowance, the caption will be restricted. However,
that's why we have comments - when you get home,
you can comment to your own post to expand on the
whole situation. You can't write that much when you're
out and about on a phone anyway.

3. Uploading of binary files
The upload process should be simple enough, as long as
the MetaWeblog API is fully implemented. If so, and the
user has configured their upload directory to be
writable, everything should work.

Conclusion
I think this should be easy to implement. I'd like to find
out more about the implementation of the MetaWeblog
API in bBlog, and I'd like to help out in any way I can. I
am a software developer by trade, and although I'm
fairly new with PHP, if I can help I'll try.

Examples
EasyMoblog http://sourceforge.net/projects/easymoblog/

Problems
http://www.ideaspace.net/users/wkearney/archives/entr
ies/000072.html

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.