@@ -66,18 +66,17 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
66
66
Support for the :keyword: `with ` statement was added.
67
67
68
68
.. versionchanged :: 3.3
69
- source_address argument was added.
69
+ * source_address * argument was added.
70
70
71
71
.. versionadded :: 3.5
72
72
The SMTPUTF8 extension (:rfc: `6531 `) is now supported.
73
73
74
74
.. versionchanged :: 3.9
75
75
If the *timeout * parameter is set to be zero, it will raise a
76
- :class: `ValueError ` to prevent the creation of a non-blocking socket
76
+ :class: `ValueError ` to prevent the creation of a non-blocking socket.
77
77
78
- .. class :: SMTP_SSL(host='', port=0, local_hostname=None, keyfile=None, \
79
- certfile=None [, timeout], context=None, \
80
- source_address=None)
78
+ .. class :: SMTP_SSL(host='', port=0, local_hostname=None, * [, timeout], \
79
+ context=None, source_address=None)
81
80
82
81
An :class: `SMTP_SSL ` instance behaves exactly the same as instances of
83
82
:class: `SMTP `. :class: `SMTP_SSL ` should be used for situations where SSL is
@@ -90,15 +89,11 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
90
89
aspects of the secure connection. Please read :ref: `ssl-security ` for
91
90
best practices.
92
91
93
- *keyfile * and *certfile * are a legacy alternative to *context *, and can
94
- point to a PEM formatted private key and certificate chain file for the
95
- SSL connection.
96
-
97
92
.. versionchanged :: 3.3
98
93
*context * was added.
99
94
100
95
.. versionchanged :: 3.3
101
- source_address argument was added.
96
+ The * source_address * argument was added.
102
97
103
98
.. versionchanged :: 3.4
104
99
The class now supports hostname check with
@@ -116,13 +111,16 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
116
111
If the *timeout * parameter is set to be zero, it will raise a
117
112
:class: `ValueError ` to prevent the creation of a non-blocking socket
118
113
114
+ .. versionchanged :: 3.12
115
+ The deprecated *keyfile * and *certfile * parameters have been removed.
116
+
119
117
.. class :: LMTP(host='', port=LMTP_PORT, local_hostname=None, \
120
118
source_address=None[, timeout])
121
119
122
120
The LMTP protocol, which is very similar to ESMTP, is heavily based on the
123
121
standard SMTP client. It's common to use Unix sockets for LMTP, so our
124
122
:meth: `connect ` method must support that as well as a regular host:port
125
- server. The optional arguments local_hostname and source_address have the
123
+ server. The optional arguments * local_hostname * and * source_address * have the
126
124
same meaning as they do in the :class: `SMTP ` class. To specify a Unix
127
125
socket, you must use an absolute path for *host *, starting with a '/'.
128
126
@@ -360,7 +358,7 @@ An :class:`SMTP` instance has the following methods:
360
358
be used as argument to the ``AUTH `` command; the valid values are
361
359
those listed in the ``auth `` element of :attr: `esmtp_features `.
362
360
363
- *authobject * must be a callable object taking an optional single argument:
361
+ *authobject * must be a callable object taking an optional single argument::
364
362
365
363
data = authobject(challenge=None)
366
364
@@ -393,7 +391,7 @@ An :class:`SMTP` instance has the following methods:
393
391
.. versionadded :: 3.5
394
392
395
393
396
- .. method :: SMTP.starttls(keyfile=None, certfile=None , context=None)
394
+ .. method :: SMTP.starttls(* , context=None)
397
395
398
396
Put the SMTP connection in TLS (Transport Layer Security) mode. All SMTP
399
397
commands that follow will be encrypted. You should then call :meth: `ehlo `
@@ -416,6 +414,9 @@ An :class:`SMTP` instance has the following methods:
416
414
:func: `ssl.create_default_context ` select the system's trusted CA
417
415
certificates for you.
418
416
417
+ .. versionchanged :: 3.12
418
+ The deprecated *keyfile * and *certfile * parameters have been removed.
419
+
419
420
:exc: `SMTPHeloError `
420
421
The server didn't reply properly to the ``HELO `` greeting.
421
422
0 commit comments