Skip to content

gh-124864: Extends smtplib documentation on ESMTP options format #132547

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions Doc/library/smtplib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -428,12 +428,14 @@

.. method:: SMTP.sendmail(from_addr, to_addrs, msg, mail_options=(), rcpt_options=())

Send mail. The required arguments are an :rfc:`822` from-address string, a list

Check warning on line 431 in Doc/library/smtplib.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:meth reference target not found: mail [ref.meth]

Check warning on line 431 in Doc/library/smtplib.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:meth reference target not found: rcpt [ref.meth]

Check warning on line 431 in Doc/library/smtplib.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:meth reference target not found: data [ref.meth]
of :rfc:`822` to-address strings (a bare string will be treated as a list with 1
address), and a message string. The caller may pass a list of ESMTP options
(such as ``8bitmime``) to be used in ``MAIL FROM`` commands as *mail_options*.
(such as ``"8bitmime"``) to be used in ``MAIL FROM`` commands as *mail_options*.
ESMTP options (such as ``DSN`` commands) that should be used with all ``RCPT``
commands can be passed as *rcpt_options*. (If you need to use different ESMTP
commands can be passed as *rcpt_options*. Each option should be passed as a string
containing the full text of the option, including any potential key
(for instance, ``"NOTIFY=SUCCESS,FAILURE"``). (If you need to use different ESMTP
options to different recipients you have to use the low-level methods such as
:meth:`mail`, :meth:`rcpt` and :meth:`data` to send the message.)

Expand Down
Loading