From 10738f19cc9174ac195e4d45ba1d952177b2fc6e Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Tue, 16 Dec 2025 12:27:42 +0100 Subject: [PATCH] [3.13] gh-124864: Extends smtplib documentation on ESMTP options format (GH-132547) (#142797) Co-authored-by: Patrick R --- Doc/library/smtplib.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst index c5a3de52090c..10525c90aa90 100644 --- a/Doc/library/smtplib.rst +++ b/Doc/library/smtplib.rst @@ -440,9 +440,11 @@ An :class:`SMTP` instance has the following methods: Send mail. The required arguments are an :rfc:`822` from-address string, a list 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.) -- 2.47.3