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
email examples should not gratuitously mess with preamble #80442
Comments
Several of the examples in the email module documentation modify the preamble. This is not good practice. The email MIME preamble is really only useful for communicating information about MIME itself, not for general human-readable content like 'Our family reunion'. The MIME preamble is problematic because it typically only supports ASCII and often defaults to an English-language message, even when applications are used in locales where English is not widely understood. For this reason, it is moderately useful to be able to override the preamble from Python code; but this should by no means be done routinely, and the documentation should certainly not demonstrate this in basic examples. |
I don't see "several", can you point to the other instances? I only see that one case you mention (for reference, it is in Doc/includes/email-mime.py). The other case of setting preamble is actually correct ("You will not see this in a MIME-aware mail reader"). We could change email-mime to say the same thing. |
We could also change both of them to be more correct and say something like "If you are reading this your browser probably does not support MIME, and you will have to find a MIME aware email client or decode the message by hand." That demonstrates what the preamble is actually for. |
I also only found the one case. Submitted a patch. |
Merged, and I am assuming the backports will merge fine too. Thanks for the patch! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: