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:
The add-on for forums has the following initial capabilities:
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.
Subscribe to notificaitons