This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Here's my approach to create a bridge between 2 interesting java applications. JspWiki and apache James.

WikiMailet makes it possible to email to a wiki. Currently the mailet is in a very early stage, more proof-of-concept than actually useful. But it clearly shows the possibilities.

The current Mailet lets you mail to a special email address (configured in James), takes the subject as pagename and saves the body of the email in the wiki page.


  • AFAIK the XMLRPC interface doesn't (yet) let me change or create pages. So I instantiated a WikiEngine instance in the Mailet and use that to enter data into the wiki. A possible solution would be to use Http post to the Edit.jsp itself, and enter data as a normal user would through the browser, but IMHO that looks ugly.
  • The James mail server runs in a different VM as the WikiEngine web app. The Wiki cache doesn't know when a page is updated by email. So for the moment I simply turned off caching in my test setup. How should I solve this?
  • Security: the only practical way to authenticate is through the senders email address. Obviously this isn't very secure ;-). But then again, the concept of a wiki makes it normally editable by everyone. A different approach would be to use SMTP authentication, but then you have to use that specific SMTP server to send to the wiki.

Current features!!!#

  • Well, not much yet ;-)
  • the email subject is used as page name.


  • Enable HTML emails. Currently only plain text emails are handled correctly.
I guess there are 2 possibilities for this: AllowingRawHTML or HTML to JSPWiki Markup convertor. Anyone has any thoughts? ideas?
  • Create new page. Currently only existing pages can be mailed to.
  • Specify whether an email should replace or append an existing page. (configurable per page?)
  • Add more info besides the body content: timestamp, from address, other headers?
  • process attachments (this is perhaps the most interesting feature. Many people know how to email attachments, fotos... but have difficulties with http file upload)
  • Keep a history in a separate MailIndex page.

Configuration & setup!!!#

  • First get Apache james and JspWiki running. The most practical setup is to have them both on the same machine. But, especially when you use JDBC storage this is not strictly required.
  • Add all the necessary jar files (all jars from JspWiki/WEB-INF/lib) to james/apps/james/SAR-INF/lib
  • add the Mailet jar (jamesWiki.jar) there as well.
  • configure jspWiki:
    • just turn of caching untill I found a solution.
  • configure James (james/apps/james/SAR-INF/config.xml)
    • add <mailetpackage>com.storedesk.jspwiki</mailetpackage> to the mailetpackages.
    • Configure the mailet: use the needed Matching and specify a correct properties file.

Eg. if you want a specific emailaddress to be forwarded to the wiki:

 	<mailet match="" class="WikiMailet">



If both the wiki and mailserver are on the same machine, the config can simply point to the actual file.


Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
java 4.2 kB 2 07-Jan-2005 11:53 GeertVanDamme
jamesWiki.jar 2.9 kB 2 07-Jan-2005 11:53 GeertVanDamme
« This particular version was published on 07-Jan-2005 11:51 by GeertVanDamme.