diff options
author | Dong-hee Na <donghee.na92@gmail.com> | 2020-01-14 21:42:09 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@python.org> | 2020-01-14 21:42:09 (GMT) |
commit | 65a5ce247f177c4c52cfd104d9df0c2f3b1c91f0 (patch) | |
tree | f1d71cd0ef97d2f55219e4e349eaa23ce87e49ac /Doc/library/smtplib.rst | |
parent | 7d6378051feeadf45b4ce45b4b406b65df255648 (diff) | |
download | cpython-65a5ce247f177c4c52cfd104d9df0c2f3b1c91f0.zip cpython-65a5ce247f177c4c52cfd104d9df0c2f3b1c91f0.tar.gz cpython-65a5ce247f177c4c52cfd104d9df0c2f3b1c91f0.tar.bz2 |
bpo-39329: Add timeout parameter for smtplib.LMTP constructor (GH-17998)
Diffstat (limited to 'Doc/library/smtplib.rst')
-rw-r--r-- | Doc/library/smtplib.rst | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst index f6ac123..a88e358 100644 --- a/Doc/library/smtplib.rst +++ b/Doc/library/smtplib.rst @@ -115,7 +115,8 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions). If the *timeout* parameter is set to be zero, it will raise a :class:`ValueError` to prevent the creation of a non-blocking socket -.. class:: LMTP(host='', port=LMTP_PORT, local_hostname=None, source_address=None) +.. class:: LMTP(host='', port=LMTP_PORT, local_hostname=None, + source_address=None[, timeout]) 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 @@ -128,6 +129,9 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions). Unix socket, LMTP generally don't support or require any authentication, but your mileage might vary. + .. versionchanged:: 3.9 + The optional *timeout* parameter was added. + A nice selection of exceptions is defined as well: |