Greetings, NotMail-0.1.0 and IMAPAdapter-0.1.0 have been posted to the prereleases area of the site: http://www.zope.org/Download/Prereleases/Mail These are first beta cuts. Both programs are also available in the public CVS. IMAPAdapter allows you to work with IMAP folders and messages in the context of an authenticated IMAP user. Using IMAPAdapter, it is very easy to build IMAP client functionality into your Zope site using DTML. NotMail is a simple web IMAP client that requires IMAPAdapter. Its mail purpose is to verify the operation of IMAPAdapter and to provide an example implimentation of IMAPAdapter's client functionality. NotMail is mostly DTML, and what Python there is is just specific to sending and replying to mail, all other functionality comes from IMAPAdapter. It is important to note that IMAPAdapter looks like a user folder to Zope, in Zope parlance, we call this a user database. It's not a user folder, because it doesn't not contain users. If Zope tries to validate a user against an IMAPAdapter, the IMAPAdapter will contact the IMAP server, try to make a connection with the uid:pwd that the browser supplied, returning either a user object or None, depending on the success or failure of that connection attempt. This means that using IMAPAdapter is quite simple. Here is a snip of DTML to display all an IMAP users mail folders with the #tree tag. <!--#var standard_html_header--> <!--#with AUTHENTICATED_USER--> <!--#tree expr="imapFolderTree(REQUEST)" sort=id nowrap=1--> <img src=<!--#var icon-->> <!--#var shortname--> <!--#if num--> (<!--#var num-->) <!--#/if--> <!--#/tree--> <!--#/with--> <!--#var standard_html_footer--> The user object that IMAPAdapter returns (if the user is valid) is placed into AUTHENTICATED_USER. emapFolderTree is one method of this user object, but there are about a dozen or so more methods to do various imap related things like adding/deleting folders and listing and fetching messages. If you plan on installing and trying out NotMail and IMAPAdapter it is important to know that you can configure the roles that IMAPAdapter associates with users that it returns. The two default associated roles are 'NotMail' and 'IMAPUser'. If you want NotMail to work, you will need to add one of these roles (or any roles you care to define as IMAPAdapter's default roles) somewhere above NotMail/IMAPAdapter and then assign that role the 'View' permission for NotMail's DTML Methods. Have Fun! -Michel
participants (1)
-
Michel Pelletier