Commit 3a8eb587 authored by Martijn Pieters's avatar Martijn Pieters

Fall back to HELO when EHLO (an optional extension) fails

parent 6274da72
...@@ -5,6 +5,14 @@ This file contains change information for the current Zope release. ...@@ -5,6 +5,14 @@ This file contains change information for the current Zope release.
Change information for previous versions of Zope can be found in the Change information for previous versions of Zope can be found in the
file HISTORY.txt. file HISTORY.txt.
Zope 2.12.4 (Unreleased)
------------------------
Bugs Fixed
++++++++++
- MailHost should fall back to HELO when EHLO fails.
Zope 2.12.3 (2010/01/12) Zope 2.12.3 (2010/01/12)
------------------------ ------------------------
......
...@@ -49,8 +49,10 @@ class SMTPMailer(object): ...@@ -49,8 +49,10 @@ class SMTPMailer(object):
# send EHLO # send EHLO
code, response = connection.ehlo() code, response = connection.ehlo()
if code < 200 or code >300: if code < 200 or code >300:
raise RuntimeError('Error sending EHLO to the SMTP server ' code, response = connection.helo()
'(code=%s, response=%s)' % (code, response)) if code < 200 or code >300:
raise RuntimeError('Error sending HELO to the SMTP server '
'(code=%s, response=%s)' % (code, response))
# encryption support # encryption support
have_tls = connection.has_extn('starttls') have_tls = connection.has_extn('starttls')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment