Hi Justin

About 6 months ago I started on a related idea: a web mail archive. I didn't
get very far, and had to stop work on it while I did some paid work ;-) but
I've just downloaded C2 sources and started again.

My main idea was to implement webmail in Cocoon on top of a mail-server,
such as James, using standard mail-access protocols.

This doesn't answer all your questions, but here's what I discovered while
researching it:

Firstly, there's already an XSP logicsheet for sending mail, but AFAIK
there's nothing for receiving/reading mail.

It seemed to me the idea would be to build components that would read
internet email from a POP mailbox, IMAP folder, or NNTP newsgroup. These
would be sub-classes of Source. Then we'd need a MailFolderGenerator and a
MailMessageGenerator to parse the message (based on JavaMail
InternetMessage) and generate XML. Of course we could have emails stored in
individual files, so it would be useful to be able to read the email from
other sources, which is why it makes sense to decouple the source (mail
transport) from the mail generator (MIME parser).

There's an XML vocabulary for representing email messages, called XMTP, and
a sample Java implementation of a SAX XMLReader which reads a MIME message
and emits SAX events (basis for a MIMEMessageGenerator), available at
http://www.openhealth.org/xmtp/ The XMTP licence is open source and looks to
my untrained eye to be compatible with the Apache licence. In any case, the
mapping from JavaMail to the XMTP vocabulary is very straight-forward.

There's quite a variety of mail-related URL schemes, but they're not all
capable of addressing individual messages. e.g. the official POP URL scheme
allows you to address only a POP MAILBOX, not a message INSIDE a mailbox,
NEWS can address individual messages (in 2 different ways), while IMAP URLs
can address even individual MIME-parts within messages.

JavaMail includes drivers for POP and IMAP, and there are a few third-party
drivers for NNTP - not sure about compatibility with the Apache software
licence though.

The Jakarta mail server, James, supports NNTP and POP3, but not yet IMAP.

Cheers!

Con


> -----Original Message-----
> From: Justin Fagnani-Bell [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 26 July 2002 09:54
> To: [EMAIL PROTECTED]
> Subject: Cocoon based WebMail?
>
>
> Hey all,
>
>    I'm interested in setting up WebMail on my cocoon based site. I
> haven't found anything so far so I'm planning on doing it myself. Is
> this something that would be better done through the community and
> included as a part of Cocoon perhaps? I'm guessing so,
> because it seeems
> like something that lots of people might need and could
> really show off
> Cocoon's capabilities. I've never contributed much to any open source
> project though so I'd like to get feedback.
>
> Here's my ideas... I've only used Cocoon up to 2.02, so I'm
> not really
> familiar with FlowScript. I've followed the conversations, and think
> that maybe it could apply here, but my ideas don't include it yet.
> There's also so many ways to do things in Cocoon that I'm not
> sure which
> would be the best.
>
> The first way is to create a MailGenerator base class that
> performs user
> authentication, gets mail, accepts request parameters for
> managing mail
> and sending it, and outputs XML. An XSL stylesheet creates the views,
> and the sitemap is kept real simple:
>
> <map:match pattern="mail">
>    <map:generate type="mail">
>    <map:transform src="mailTheme1.xsl"/>
> </map:match>
>
> This is the quick and dirty way that I'd probably start with, but it
> makes the generator and stylesheet more complicated. Another
> way is to
> split up the generator and stylesheet by their views and use and
> action/selector to choose which one. The sitemap map might look
> something like this (excuse any errors here I'm just brainstorming)
>
> <map:match pattern="mail">
>    <map:act type="mail">
>      <map:select type="parameter">
>        <map:parameter name="parameter-selector-test" value="{view}"/>
>        <map:when test="mailbox">
>          <map:generate type="mailbox"/>
>          <map:transform src="mailbox-theme1.xsl"/>
>        </map:when>
>        <map:when test="message">
>          <map:generate type="message"/>
>          <map:transform src="message-theme1.xsl"/>
>        </map:when>
>        <map:when test="login">
>          <map:generate type="login"/>
>          <map:transform src="login-theme1.xsl"/>
>        </map:when>
>        <map:otherwise>
>          <map:generate src="error.xsp"/>
>          <map:transform src="error.xsl"/>
>        </map:otherwise>
>      </map:select>
>    </map:act>
> </map:match>
>
> And yet another way is to use XSP, with a different xsp for each view
> (login.xsp, mailbos.xsp, message.xsp, etc). And then there's
> FlowScript.
>
> I don't really know too many of the advantages af each. Any comments?
>
> Thanks,
>    Justin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to