Skip to content

Doc: Clarify smtplib server reply bytes - #149970

Open
savagemechanic wants to merge 1 commit into
python:mainfrom
savagemechanic:docs-smtplib-reply-bytes
Open

Doc: Clarify smtplib server reply bytes#149970
savagemechanic wants to merge 1 commit into
python:mainfrom
savagemechanic:docs-smtplib-reply-bytes

Conversation

@savagemechanic

@savagemechanic savagemechanic commented May 18, 2026

Copy link
Copy Markdown
Contributor

Docs-only change.

Clarifies that SMTP server reply messages returned by smtplib APIs are bytes, including SMTP.verify() responses and refused-recipient entries from SMTP.sendmail().

Local check:

make -C Doc check SPHINXOPTS='-W --keep-going'

@savagemechanic
savagemechanic requested a review from a team as a code owner May 18, 2026 01:17
@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels May 18, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs May 18, 2026
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #32729264 | 📁 Comparing c740c99 against main (acefff9)

  🔍 Preview build  

1 file changed
± library/smtplib.html

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 90 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Aug 19, 2026

@bitdancer bitdancer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for suggesting this.

What about docmd, connect, and sendmail?

Comment thread Doc/library/smtplib.rst
:class:`bytes` object. If the user address is valid, *code* is 250 and
*message* contains a full :rfc:`822` address (including human name).
Otherwise *code* is an SMTP error code of 400 or greater and *message*
contains the error response.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good rewrite, but I think it would read better if we said "code is the response code from the server as an integer and message is..."

Comment thread Doc/library/smtplib.rst
and the accompanying error message sent by the server.
recipient that was refused. Each entry contains a ``(code, response)`` tuple,
where *code* is the SMTP error code and *response* is the accompanying server
error response as a :class:`bytes` object.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similarly here, "as an integer".

@bedevere-app

bedevere-app Bot commented Aug 22, 2026

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

And if you don't make the requested changes, you will be put in the comfy chair!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changes docs Documentation in the Doc dir skip news stale Stale PR or inactive for long period of time.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants