[Zope3-checkins] CVS: Zope3/src/zope/app - configure.zcml:1.17 meta.zcml:1.6

Stephan Richter srichter@cbu.edu
Wed, 16 Apr 2003 09:46:13 -0400


Update of /cvs-repository/Zope3/src/zope/app
In directory cvs.zope.org:/tmp/cvs-serv29814

Modified Files:
	configure.zcml meta.zcml 
Log Message:
This is a first stab at a flexible facility to send out mail. I discussed
the API with Barry a bit, before writing this code. 

Goals:

  - Keep the actual IMailService interface as simple as possible.

  - Allow flexible mechanisms to send mail.

  - Be able to implement and register you own mail sending policies. 

Implementation:

  - The global mail service is an asynchronous mail sender, which means 
    it does not block the request. Once it is done, it will send an event
    to which interested parties can subscribe.

  - The AsyncMailService registers and works with Mailer objects, which 
    encode the policy of the mailing. I supplied a SimpleMailer, which has
    no specific policies and a BatchMailer, which allows to send the 
    messages in batches, so that the SMTP server will not overload. I 
    currently do not have any of the mailers in action, but I am going to
    add MailService support to the zwiki product for testing purposes soon.

  - MailService will make heavy use of the EventService for publishing 
    status updates, which is necessary due to its async nature. Currently 
    I have only one event, but I plan to add more soon.

To Do:

  - I lied about the AsyncMailService to be async! :-) I actually have not 
    implemented the async behavior yet; I need help from other people for
    this feature. Should I use thread or asyncore, and how do I use either 
    one. I am not really knowledgable in this area.

  - As mentioned above, add more events.

  - Come up with advanced unit tests for the BatchMailer.

  - Put the MailService-specific ZCML directive into a higher up ZCML file,
    since it contains server-specific information, similar to the ones for 
    HTTP and FTP.


=== Zope3/src/zope/app/configure.zcml 1.16 => 1.17 ===
--- Zope3/src/zope/app/configure.zcml:1.16	Thu Apr 10 12:07:45 2003
+++ Zope3/src/zope/app/configure.zcml	Wed Apr 16 09:45:42 2003
@@ -11,6 +11,7 @@
   <include package="zope.app.component" />
   <include package="zope.app.security" />
   <include package="zope.app.event" />
+  <include package="zope.app.mail" />
 
   <serviceType
      id="SQLDatabaseConnections"


=== Zope3/src/zope/app/meta.zcml 1.5 => 1.6 ===
--- Zope3/src/zope/app/meta.zcml:1.5	Tue Apr 15 14:52:57 2003
+++ Zope3/src/zope/app/meta.zcml	Wed Apr 16 09:45:42 2003
@@ -10,6 +10,7 @@
 <include package="zope.app.browser.form" file="meta.zcml" />
 <include package="zope.app.contentdirective" file="meta.zcml" />
 <include package="zope.app.event" file="meta.zcml" />
+<include package="zope.app.mail" file="meta.zcml" />
 <include package="zope.app.i18n" file="meta.zcml" />
 <include package="zope.app.startup" file="meta.zcml" />
 <include package="zope.app.applicationcontrol" file="meta.zcml" />