Skip to content

smtplib documentation fixes #8708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions Doc/library/smtplib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ An :class:`SMTP` instance has the following methods:

.. method:: SMTP.ehlo_or_helo_if_needed()

This method call :meth:`ehlo` and or :meth:`helo` if there has been no
This method calls :meth:`ehlo` and/or :meth:`helo` if there has been no
previous ``EHLO`` or ``HELO`` command this session. It tries ESMTP ``EHLO``
first.

Expand Down Expand Up @@ -379,16 +379,23 @@ An :class:`SMTP` instance has the following methods:
commands that follow will be encrypted. You should then call :meth:`ehlo`
again.

If *keyfile* and *certfile* are provided, these are passed to the :mod:`socket`
module's :func:`ssl` function.
If *keyfile* and *certfile* are provided, they are used to create an
:class:`ssl.SSLContext`.

Optional *context* parameter is a :class:`ssl.SSLContext` object; This is
Optional *context* parameter is an :class:`ssl.SSLContext` object; This is
an alternative to using a keyfile and a certfile and if specified both
*keyfile* and *certfile* should be ``None``.

If there has been no previous ``EHLO`` or ``HELO`` command this session,
this method tries ESMTP ``EHLO`` first.

.. deprecated:: 3.6

*keyfile* and *certfile* are deprecated in favor of *context*.
Please use :meth:`ssl.SSLContext.load_cert_chain` instead, or let
:func:`ssl.create_default_context` select the system's trusted CA
certificates for you.

:exc:`SMTPHeloError`
The server didn't reply properly to the ``HELO`` greeting.

Expand Down