summaryrefslogtreecommitdiffstats
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-05-07 17:41:33 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-05-07 17:41:33 (GMT)
commit5bcc50c1b55527c18f91ca13d90d05a221b91a65 (patch)
tree6b9514a5f4166514dbf0f019edd060bf6b1aa82a /Lib/smtplib.py
parent4c1aebd88bc71fcbca26279bd21f971f93acb641 (diff)
parentc1d520634a25fac5dea41f3af70273fc0b3a11ae (diff)
downloadcpython-5bcc50c1b55527c18f91ca13d90d05a221b91a65.zip
cpython-5bcc50c1b55527c18f91ca13d90d05a221b91a65.tar.gz
cpython-5bcc50c1b55527c18f91ca13d90d05a221b91a65.tar.bz2
Merge: Issue #11927: SMTP_SSL now uses port 465 by default as documented.
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-xLib/smtplib.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index 14e6250..dbccf48 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -231,6 +231,7 @@ class SMTP:
ehlo_msg = "ehlo"
ehlo_resp = None
does_esmtp = 0
+ default_port = SMTP_PORT
def __init__(self, host='', port=0, local_hostname=None,
timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
@@ -246,7 +247,6 @@ class SMTP:
"""
self.timeout = timeout
self.esmtp_features = {}
- self.default_port = SMTP_PORT
if host:
(code, msg) = self.connect(host, port)
if code != 220:
@@ -804,13 +804,15 @@ if _have_ssl:
are also optional - they can contain a PEM formatted private key and
certificate chain file for the SSL connection.
"""
+
+ default_port = SMTP_SSL_PORT
+
def __init__(self, host='', port=0, local_hostname=None,
keyfile=None, certfile=None,
timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
self.keyfile = keyfile
self.certfile = certfile
SMTP.__init__(self, host, port, local_hostname, timeout)
- self.default_port = SMTP_SSL_PORT
def _get_socket(self, host, port, timeout):
if self.debuglevel > 0: