diff options
Diffstat (limited to 'Doc/library/smtplib.rst')
-rw-r--r-- | Doc/library/smtplib.rst | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst index d4dd43f..602edb6 100644 --- a/Doc/library/smtplib.rst +++ b/Doc/library/smtplib.rst @@ -19,13 +19,14 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions). .. class:: SMTP([host[, port[, local_hostname[, timeout]]]]) - A :class:`SMTP` instance encapsulates an SMTP connection. It has methods that - support a full repertoire of SMTP and ESMTP operations. If the optional host and - port parameters are given, the SMTP :meth:`connect` method is called with those - parameters during initialization. An :exc:`SMTPConnectError` is raised if the - specified host doesn't respond correctly. The optional *timeout* parameter - specifies a timeout in seconds for the connection attempt (if not specified, or - passed as None, the global default timeout setting will be used). + A :class:`SMTP` instance encapsulates an SMTP connection. It has methods + that support a full repertoire of SMTP and ESMTP operations. If the optional + host and port parameters are given, the SMTP :meth:`connect` method is called + with those parameters during initialization. An :exc:`SMTPConnectError` is + raised if the specified host doesn't respond correctly. The optional + *timeout* parameter specifies a timeout in seconds for blocking operations + like the connection attempt (if not specified, or passed as None, the global + default timeout setting will be used). For normal use, you should only require the initialization/connect, :meth:`sendmail`, and :meth:`quit` methods. An example is included below. @@ -35,13 +36,14 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions). A :class:`SMTP_SSL` instance behaves exactly the same as instances of :class:`SMTP`. :class:`SMTP_SSL` should be used for situations where SSL is - required from the beginning of the connection and using :meth:`starttls` is not - appropriate. 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* - are also optional, and can contain a PEM formatted private key and certificate - chain file for the SSL connection. The optional *timeout* parameter specifies a - timeout in seconds for the connection attempt (if not specified, or passed as - None, the global default timeout setting will be used). + required from the beginning of the connection and using :meth:`starttls` is + not appropriate. 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* are also optional, and can contain a PEM formatted private key + and certificate chain file for the SSL connection. The optional *timeout* + parameter specifies a timeout in seconds for blocking operations like the + connection attempt (if not specified, or passed as None, the global default + timeout setting will be used). .. class:: LMTP([host[, port[, local_hostname]]]) |