mail and news
"Smart mail" or "web mail" is an HTML-driven mail client that uses RDF, JavaScript and HTML to read mail. For real. This is not Netscape Messenger. This is not the mail from Netscape Navigator 3.0. This is something else.
how it works
There are three major parts to smart/web mail:- Networking: network/protocol/pop3/mkpop3.c
- This code talks to a POP server and gets mail. It sorta
does multiple accounts, but there's some global cruft that
needs cleaning up. When it gets the mail, it feeds it to
pm2rdf.c (see below). There's a lot of old stuff
cut-and-pasted into here from libmsg and biff and Nikki days.
Cleanup would be good. It also handles mailbox:// URLs.
TODO: lots of cleanup, imap and/or nntp support.
- RDF data source code: modules/rdf/src/pm2rdf.c
- It's an RDF
data source.
Berkeley-style mail folders and their summary files are
presented to the "shack" widget (Aurora RDF-tree widget embeddable in
HTML), which then does display and other stuff. The mail
folder management is "weak at best", so nobody's going to be
offended if you send in a patch that replaces it wholesale.
(It's about 500 lines, including the RDF reflection code, if
that encourages you at all.) We currently let you read, copy,
move and delete messages, but mail is always left on the
server. (This is for your protection.) The summary file
("ssf" for "Silly Summary File") is just ASCII, which makes
debugging easier.
TODO: should use NSPR and not libc. folder management rewrite, possibly RDF reflection rewrite. Compaction of folders, other flags for forwarding, etc. Filtering (talk to guha if you want to do this -- there is a right and cheap way to do this with RDF and JS).
- Front end: HTML!
- The heart of the front end is the "shack" and "ender" HTML widgets. "Ender" is an HTML-aware <TEXTAREA>. "Shack", as mentioned above, is the Aurora widget in an <OBJECT> tag. Both these widgets can be improved a lot, which would make other parts of Mozilla happier too. (Try to do things better in the XP code. You know it's the right thing.) Right now, ender and shack work properly only on Win32. We are more sorry about this than you are. Because the interface is all HTML and the back-end groks RDF, this can be totally customized and server-driven. You get the best of fat mail (slick UI, locality of operation) with the best of webmail (location independence, ease of upgrade).
how to build it
- Get the recent source.
- Set
SMART_MAIL
andMOZ_ENDER
to 1. - Build it.
- Try it out: client-side or server-side.
- Can't try it out? Check out the screenshot.