@@ -271,7 +271,7 @@ An :class:`SMTP` instance has the following methods:
271
271
272
272
.. method :: SMTP.ehlo_or_helo_if_needed()
273
273
274
- This method call :meth: `ehlo ` and or :meth: `helo ` if there has been no
274
+ This method calls :meth: `ehlo ` and/ or :meth: `helo ` if there has been no
275
275
previous ``EHLO `` or ``HELO `` command this session. It tries ESMTP ``EHLO ``
276
276
first.
277
277
@@ -379,16 +379,23 @@ An :class:`SMTP` instance has the following methods:
379
379
commands that follow will be encrypted. You should then call :meth: `ehlo `
380
380
again.
381
381
382
- If *keyfile * and *certfile * are provided, these are passed to the :mod: ` socket `
383
- module's :func : `ssl ` function .
382
+ If *keyfile * and *certfile * are provided, they are used to create an
383
+ :class : `ssl.SSLContext ` .
384
384
385
- Optional *context * parameter is a :class: `ssl.SSLContext ` object; This is
385
+ Optional *context * parameter is an :class: `ssl.SSLContext ` object; This is
386
386
an alternative to using a keyfile and a certfile and if specified both
387
387
*keyfile * and *certfile * should be ``None ``.
388
388
389
389
If there has been no previous ``EHLO `` or ``HELO `` command this session,
390
390
this method tries ESMTP ``EHLO `` first.
391
391
392
+ .. deprecated :: 3.6
393
+
394
+ *keyfile * and *certfile * are deprecated in favor of *context *.
395
+ Please use :meth: `ssl.SSLContext.load_cert_chain ` instead, or let
396
+ :func: `ssl.create_default_context ` select the system's trusted CA
397
+ certificates for you.
398
+
392
399
:exc: `SMTPHeloError `
393
400
The server didn't reply properly to the ``HELO `` greeting.
394
401
0 commit comments