(photo by Kasaa)

We were recently tasked with an Elgg project that requires forum discussions to behave like mailing lists.  There's already a community contributed plugin that does something similar but doesn't quite meet the client's required specifications, notably with regards to permissions.

During the initial design, the client mentioned that we should think about reusability since the system might require other functionality that makes use of incoming emails in the future.  So instead of just coding a plugin that will take care of discussions via email I decided to write a plugin that can handle incoming emails in a generic way and then trigger plugin hooks.  The different plugins will then be responsible for implementation on how to handle the incoming email.

This resulted in the creation of the incoming_email_handler plugin and an add-on that registers a plugin hook for incoming emails to handle forum posts.

For backend processing of the emails, I used the php-mime-mail-parser PHP class.  This requires the PECL PHP extension mailparse.

The following are the plugin's initial capabilities:

  • support for handling the various encodings in emails
  • support for extracting email attachments
  • triggers hooks for different object types depending on the mail's sender email address
  • support for both HTML and plain text
  • mail credentials are configurable using plugin settings

The add-on for forums has the following initial capabilities:

  • handle attachments and post them as files belonging to the group
  • rewrites the sender email so that the user only needs to reply to the received email
  • prevents duplicate emails from being sent out if the user happens to be subscribed to both incoming emails and group notifications

This plugin is already in production use but contains some custom client specific code.  We are still in the process of cleaning it up to "just work" with stock Elgg code.

posted in , ,
Add comment
Recent Entries
Categories

AJAX (15)
CCK08 (1)
MEL (28)
LAMS (11)
Tech (17)



Authors




Archive




Notifications
Icon of envelope Subscribe to notificaitons


Syndication Feed
XML


Recent Comments
  1. Tom Wills: China Mobile Phones
  2. Kenneth Wyrick: This is pretty exciting news
  3. Kenneth Wyrick: This is exciting!
  4. Deborah Boatwright: Elluminate Session
  5. Caroline Meeks: ShovelReadyEd.com
  6. Dave Bauer: LAMS is GPL
  7. Jose I. Icaza: Sound ok?
  8. Caroline Meeks: Followup Article on OLPC News
  9. Nicco Eneidi: It was a Toshiba Portege M400 at FOSSVT
  10. himadri palit: unable to get this working



Technorati Blogs