james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <vadim.gritse...@verizon.net>
Subject Re: James/Cocoon integration
Date Fri, 11 Jul 2003 12:12:03 GMT
Noel J. Bergman wrote:

>As I
>understand Cocoon, we'd need an XMTPGenerator (MIME -> SAX Events)

Yes, that would be needed, but that won't be the most used component for 
"mailapps" (drawing a parallel with webapps, XMTPGenerator to mail is 
what StreamGenerator to HTTP -- it's not used that very often), and 
won't be necessary generator.

What used more often are headers of the email. Imagine ezmlm in 
James/Cocoon: what you need from the incoming email is usually the 
subject ("URL" :). And you want to get this subject in your sitemap to 
match against it. So first you need is to write Cocoon environment to 
populate request parameters and request URL and such from the Java mail 

You will need XMTPGenerator too to get an email body - it's just not the 
first part which comes to mind. Or, even better, you should compare 
email to handling mime-multipart HTTP request. Then, you can use 
existing RequestGenerator and StreamGenerator instead of writing 
XMTPGenerator (which is still possible to write - but much less reasons to).

> and
>XMTPSerializer (SAX Events -> MIME).

TextSerializer for plain text emails, HTMLSerializer for html, Mime 
multipart serializer - for mail with attachements. Environment should 
convert Cocoon Response object into Java Mail object.


To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message