diff options
author | R David Murray <rdmurray@bitdance.com> | 2013-06-23 20:06:13 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2013-06-23 20:06:13 (GMT) |
commit | 9dac840e3caaae17765463bd1a217604aea8984a (patch) | |
tree | 175b4487e249cf68e9ebd82bd76d1c6620987d32 /Lib/smtplib.py | |
parent | ec94eac4c9390b8dc656c110d775c3e33cf6c93a (diff) | |
parent | 021362dbd4b1385dbb5cd36200bf790399a1335f (diff) | |
download | cpython-9dac840e3caaae17765463bd1a217604aea8984a.zip cpython-9dac840e3caaae17765463bd1a217604aea8984a.tar.gz cpython-9dac840e3caaae17765463bd1a217604aea8984a.tar.bz2 |
Merge #18179: reflow paragraphs.
Diffstat (limited to 'Lib/smtplib.py')
-rw-r--r-- | Lib/smtplib.py | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py index 8d0f621..80dd468 100644 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -222,14 +222,14 @@ class SMTP: If specified, `host' is the name of the remote host to which to connect. If specified, `port' specifies the port to which to connect. 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 in the - HELO/EHLO command. Otherwise, - the local hostname is found using socket.getfqdn(). The - `source_address` parameter takes a 2-tuple (host, port) for the socket - to bind to as its source address before connecting. If the host is '' - and port is 0, the OS default behavior will be used. + 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 in the HELO/EHLO + command. Otherwise, the local hostname is found using + socket.getfqdn(). The `source_address` parameter takes a 2-tuple (host, + port) for the socket to bind to as its source address before + connecting. If the host is '' and port is 0, the OS default behavior + will be used. """ self.timeout = timeout @@ -853,15 +853,17 @@ class SMTP: if _have_ssl: class SMTP_SSL(SMTP): - """ 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. local_hostname and - source_address have the same meaning as they do 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. context also optional, can contain - a SSLContext, and is an alternative to keyfile and certfile; If it is specified both - keyfile and certfile must be None. + """ 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. local_hostname and source_address have the same meaning + as they do 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. context also optional, can contain a + SSLContext, and is an alternative to keyfile and certfile; If it is + specified both keyfile and certfile must be None. + """ default_port = SMTP_SSL_PORT @@ -904,12 +906,11 @@ class LMTP(SMTP): """LMTP - Local Mail Transfer Protocol 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 + 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. local_hostname and source_address have the same - meaning as they do in the SMTP class. - To specify a Unix socket, you must use an absolute - path as the host, starting with a '/'. + meaning as they do 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 using a Unix socket, LMTP generally don't support or require any |