Fixes (accepts patch) issue1339 - http://bugs.python.org/issue1339
- Factor out the duplication of EHLO/HELO in login() and sendmail() to
a new function, ehlo_or_helo_if_needed().
- Use ehlo_or_helo_if_needed() in starttls()
- Check for the starttls exception in starttls() in the same way as
login() checks for the auth extension.
Contributed by Bill Fenner.
diff --git a/Misc/NEWS b/Misc/NEWS
index 4a494a8..828aab2 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -990,6 +990,12 @@
RFC 3207 and forgets any knowledge obtained from the server not obtained
from the TLS negotiation itself. Patch contributed by Bill Fenner.
+- Issue1339: The smtplib.SMTP class has been refactored a bit such
+ that the SMTP.starttls() caller no longer needs to call ehlo()
+ beforehand. SMTP.starttls() now raises an exception of the server
+ does not claim to support starttls. Adds the SMTP.ehlo_or_helo_if_needed()
+ method. Patch contributed by Bill Fenner.
+
Extension Modules
-----------------