Log message for revision 79239:
  Added support for force_tls flag. Leaving the no_tls flag out right now.
  

Changed:
  U   Zope/trunk/lib/python/Products/MailHost/MailHost.py
  U   Zope/trunk/lib/python/Products/MailHost/dtml/manageMailHost.dtml

-=-
Modified: Zope/trunk/lib/python/Products/MailHost/MailHost.py
===================================================================
--- Zope/trunk/lib/python/Products/MailHost/MailHost.py 2007-08-24 15:35:27 UTC 
(rev 79238)
+++ Zope/trunk/lib/python/Products/MailHost/MailHost.py 2007-08-24 15:47:23 UTC 
(rev 79239)
@@ -97,7 +97,7 @@
 
 
     def __init__(self, id='', title='', smtp_host='localhost', smtp_port=25, 
-                 force_tls=False, no_tls=False,
+                 force_tls=False, 
                  smtp_uid='', smtp_pwd='', smtp_queue=False, 
smtp_queue_directory='/tmp'):
         """Initialize a new MailHost instance """
         self.id = id
@@ -107,7 +107,6 @@
         self.smtp_uid = smtp_uid
         self.smtp_pwd = smtp_pwd
         self.force_tls = force_tls
-        self.no_tls = no_tls
         self.smtp_queue = smtp_queue
         self.smtp_queue_directory = smtp_queue_directory
 
@@ -120,7 +119,7 @@
     security.declareProtected(change_configuration, 'manage_makeChanges')
     def 
manage_makeChanges(self,title,smtp_host,smtp_port,smtp_uid='',smtp_pwd='', 
                            smtp_queue=False, smtp_queue_directory='/tmp',
-                           force_tls=False, no_tls=False,
+                           force_tls=False, 
                            REQUEST=None):
         'make the changes'
 
@@ -133,7 +132,6 @@
         self.smtp_port=smtp_port
         self.smtp_uid = smtp_uid
         self.smtp_pwd = smtp_pwd
-        self.no_tls = no_tls
         self.force_tls = force_tls
         self.smtp_queue = smtp_queue
         self.smtp_queue_directory = smtp_queue_directory
@@ -196,10 +194,9 @@
     def _makeMailer(self):
         """ Create a SMTPMailer """
         return SMTPMailer(hostname=self.smtp_host,
-                          int(self.smtp_port),
+                          port=int(self.smtp_port),
                           username=self.smtp_uid or None,
                           password=self.smtp_pwd or None,
-                          no_tls=self.no_tls,
                           force_tls=self.force_tls
                           )
 

Modified: Zope/trunk/lib/python/Products/MailHost/dtml/manageMailHost.dtml
===================================================================
--- Zope/trunk/lib/python/Products/MailHost/dtml/manageMailHost.dtml    
2007-08-24 15:35:27 UTC (rev 79238)
+++ Zope/trunk/lib/python/Products/MailHost/dtml/manageMailHost.dtml    
2007-08-24 15:47:23 UTC (rev 79239)
@@ -79,6 +79,23 @@
   <tr>
     <td align="left" valign="top">
     <div class="form-label">
+    Force TLS
+    </div>
+    </td>
+    <td align="left" valign="top">
+    <input type="checkbox" name="force_tls:boolean" value="1"
+     <dtml-if "force_tls">checked</dtml-if>
+    </td>
+    <td>
+        <span class="form-help">(enforce the use of an encrypted connection 
+            to the SMTP server. Mail delivery fails if the SMTP server
+            does not support encryption)
+        </span>
+    </td>
+  </tr>
+  <tr>
+    <td align="left" valign="top">
+    <div class="form-label">
     Use mail queue
     </div>
     </td>

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to