[Zope3-checkins] CVS: Zope3/src/zope/app/wiki - configure.zcml:1.10.8.1 wikipage.py:1.8.8.1

Martijn Faassen m.faassen at vet.uu.nl
Tue May 11 05:11:02 EDT 2004


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

Modified Files:
      Tag: faassen-interfaces-branch
	configure.zcml wikipage.py 
Log Message:
Sync up with changes in HEAD (so I can generate up to date patch file).


=== Zope3/src/zope/app/wiki/configure.zcml 1.10 => 1.10.8.1 ===
--- Zope3/src/zope/app/wiki/configure.zcml:1.10	Mon Mar 15 08:10:54 2004
+++ Zope3/src/zope/app/wiki/configure.zcml	Tue May 11 05:10:31 2004
@@ -1,6 +1,7 @@
 <configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:event="http://namespaces.zope.org/event"
+   xmlns:mail="http://namespaces.zope.org/mail"
    i18n_domain="zope"
    >
 
@@ -193,6 +194,16 @@
      factory=".wikipage.WikiPageWriteFile"
      permission="zope.app.wiki.EditWikiPage"
      />
+
+
+  <!-- Register mail delivery for change mails -->
+  <mail:smtpMailer name="wiki-smtp" hostname="localhost" port="25" />
+  
+  <mail:queuedDelivery 
+      name="wiki-delivery"
+      permission="zope.SendMail"
+      queuePath="./mail-queue"
+      mailer="wiki-smtp" />
 
   <!-- Register event listener for change mails -->
   <event:subscribe


=== Zope3/src/zope/app/wiki/wikipage.py 1.8 => 1.8.8.1 ===
--- Zope3/src/zope/app/wiki/wikipage.py:1.8	Mon Mar 15 08:10:54 2004
+++ Zope3/src/zope/app/wiki/wikipage.py	Tue May 11 05:10:31 2004
@@ -28,6 +28,7 @@
 from zope.app.event.interfaces import ISubscriber, IObjectModifiedEvent
 from zope.app.container.interfaces import \
      IObjectAddedEvent, IObjectRemovedEvent, IObjectMovedEvent
+from zope.app.mail.interfaces import IMailDelivery
 
 from zope.app.wiki.interfaces import IWiki, IWikiPage, IComment
 from zope.app.wiki.interfaces import IWikiContained, IWikiPageContained
@@ -259,10 +260,10 @@
         if not emails:
             return
         msg = 'Subject: %s\n\n\n%s' %(subject, body)
-        server = smtplib.SMTP(self.host, self.port)
-        server.set_debuglevel(0)
-        server.sendmail('wiki at zope3.org', emails, msg)
-        server.quit()
+        mail_delivery = zapi.getUtility(None,
+                                       IMailDelivery,
+                                       'wiki-delivery')
+        mail_delivery.send('wiki at zope3.org' , emails, msg)
 
 # Create a global mailer object.
 mailer = WikiMailer()




More information about the Zope3-Checkins mailing list