summaryrefslogtreecommitdiffstats
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-06-23 20:02:34 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-06-23 20:02:34 (GMT)
commit7f01d553338bd67cc8c8113df9043bc125f04e94 (patch)
tree5b1fa16fc606a0a637151f58445202adf56c8483 /Lib/smtplib.py
parent262df4d3e8b870534270d3dc8c421dbc7ce3113a (diff)
downloadcpython-7f01d553338bd67cc8c8113df9043bc125f04e94.zip
cpython-7f01d553338bd67cc8c8113df9043bc125f04e94.tar.gz
cpython-7f01d553338bd67cc8c8113df9043bc125f04e94.tar.bz2
#18179: document the local_hostname parameter.
Original patch by Berker Peksag.
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-xLib/smtplib.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index a3213b3..2c8dc42 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -240,7 +240,8 @@ class SMTP:
By default, smtplib.SMTP_PORT is used. If a host is specified the
connect method is called, and if it returns anything other than
a success code an SMTPConnectError is raised. If specified,
- `local_hostname` is used as the FQDN of the local host. By default,
+ `local_hostname` is used as the FQDN of the local host for the
+ HELO/EHLO command. Otherwise,
the local hostname is found using socket.getfqdn().
"""
@@ -762,7 +763,8 @@ if _have_ssl:
""" This is a subclass derived from SMTP that connects over an SSL encrypted
socket (to use this class you need a socket module that was compiled with SSL
support). If host is not specified, '' (the local host) is used. If port is
- omitted, the standard SMTP-over-SSL port (465) is used. keyfile and certfile
+ omitted, the standard SMTP-over-SSL port (465) is used. local_hostname
+ has the same meaning as it does in the SMTP class. keyfile and certfile
are also optional - they can contain a PEM formatted private key and
certificate chain file for the SSL connection.
"""
@@ -797,7 +799,8 @@ class LMTP(SMTP):
The LMTP protocol, which is very similar to ESMTP, is heavily based
on the standard SMTP client. It's common to use Unix sockets for LMTP,
so our connect() method must support that as well as a regular
- host:port server. To specify a Unix socket, you must use an absolute
+ host:port server. local_hostname has the same meaning as it does in the
+ SMTP class. To specify a Unix socket, you must use an absolute
path as the host, starting with a '/'.
Authentication is supported, using the regular SMTP mechanism. When