[Zope-Checkins] SVN: Zope/trunk/src/Products/MailHost/mailer.py Merge r108731 from 2.12: MailHost fallback to HELO

Martijn Pieters mj at zopatista.com
Wed Feb 3 09:10:01 EST 2010


Log message for revision 108732:
  Merge r108731 from 2.12: MailHost fallback to HELO

Changed:
  U   Zope/trunk/src/Products/MailHost/mailer.py

-=-
Modified: Zope/trunk/src/Products/MailHost/mailer.py
===================================================================
--- Zope/trunk/src/Products/MailHost/mailer.py	2010-02-03 14:07:58 UTC (rev 108731)
+++ Zope/trunk/src/Products/MailHost/mailer.py	2010-02-03 14:10:01 UTC (rev 108732)
@@ -49,8 +49,10 @@
         # send EHLO
         code, response = connection.ehlo()
         if code < 200 or code >300:
-            raise RuntimeError('Error sending EHLO to the SMTP server '
-                                '(code=%s, response=%s)' % (code, response))
+            code, response = connection.helo()
+            if code < 200 or code >300:
+                raise RuntimeError('Error sending HELO to the SMTP server '
+                                   '(code=%s, response=%s)' % (code, response))
 
         # encryption support
         have_tls =  connection.has_extn('starttls') 



More information about the Zope-Checkins mailing list