[Zope3-checkins] CVS: Zope3/src/zope/app/mail - mail.py:1.2 mailer.py:1.3 metaconfigure.py:1.2 service.py:1.2

Viktorija Zaksiene ryzaja@codeworks.lt
Mon, 19 May 2003 06:04:07 -0400


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

Modified Files:
	mail.py mailer.py metaconfigure.py service.py 
Log Message:
Cleanup: removed unneeded whitespaces and duplicated classes (SimpleMailer
and MailSentEvent).


=== Zope3/src/zope/app/mail/mail.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/mail/mail.py:1.1	Wed Apr 16 09:45:43 2003
+++ Zope3/src/zope/app/mail/mail.py	Mon May 19 06:03:37 2003
@@ -48,7 +48,7 @@
     def createMailer(self, name):
         "See zope.app.interfaces.services.mail.IAsyncMailService"
         return self.__mailers[name]()
-        
+
     def getMailerNames(self):
         "See zope.app.interfaces.services.mail.IAsyncMailService"
         return self.__mailers.keys()
@@ -71,28 +71,3 @@
         if default:
             self.__default_mailer = name
 
-
-class SimpleMailer:
-    __doc__ = IMailer.__doc__
-
-    __implements__ = IMailer
-
-    def send(self, fromaddr, toaddrs, message,
-             hostname, port, username, password):
-        "See zope.app.interfaces.services.mail.IMailer"
-        server = SMTP(hostname, port)
-        server.set_debuglevel(0)
-        if username is not None and password is not None:
-            server.login(username, password)
-        server.sendmail(fromaddr, toaddrs, message)
-        server.quit()
-        publish(self, MailSentEvent(self))
-
-
-class MailSentEvent:
-    __doc__ = IMailSentEvent.__doc__
-
-    __implements__ =  IMailSentEvent
-
-    def __init__(self, mailer):
-        self.mailer = mailer 


=== Zope3/src/zope/app/mail/mailer.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/mail/mailer.py:1.2	Thu May  1 15:35:23 2003
+++ Zope3/src/zope/app/mail/mailer.py	Mon May 19 06:03:37 2003
@@ -11,7 +11,7 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-"""A c
+"""MailService Implementation
 
 Simple implementation of the MailService, Mailers and MailEvents.
 


=== Zope3/src/zope/app/mail/metaconfigure.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/mail/metaconfigure.py:1.1	Wed Apr 16 09:45:43 2003
+++ Zope3/src/zope/app/mail/metaconfigure.py	Mon May 19 06:03:37 2003
@@ -2,16 +2,16 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
-"""mail ZCML Namespace handler 
+"""mail ZCML Namespace handler
 
 $Id$
 """
@@ -44,10 +44,10 @@
     if default == "True":
         default = True
 
-    def register(serviceType, name, klass, default): 
+    def register(serviceType, name, klass, default):
         mailservice = getService(None, serviceType)
         mailservice.provideMailer(name, klass, default)
-        
+
 
     return [
         Action(


=== Zope3/src/zope/app/mail/service.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/mail/service.py:1.1	Wed Apr 16 09:45:43 2003
+++ Zope3/src/zope/app/mail/service.py	Mon May 19 06:03:37 2003
@@ -17,7 +17,7 @@
 
 $Id$
 """
-from zope.app.interfaces.mail import IAsyncMailService 
+from zope.app.interfaces.mail import IAsyncMailService
 
 class AsyncMailService:
     __doc__ = IAsyncMailService.__doc__
@@ -44,7 +44,7 @@
     def createMailer(self, name):
         "See zope.app.interfaces.services.mail.IAsyncMailService"
         return self.__mailers[name]()
-        
+
     def getMailerNames(self):
         "See zope.app.interfaces.services.mail.IAsyncMailService"
         return self.__mailers.keys()