-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-36261: email example was misusing preamble field #14751
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution. This correctly addresses the issue described and for consistency, using the same preamble found in email-dir.py
.
However, since this format is exactly the same, I wonder if it would better to create a pre-configured setup to use as part of the EmailMessage
class (as a private method) instead of replicating these 5 lines in different locations:
msg = EmailMessage()
msg['Subject'] = 'Contents of directory %s' % os.path.abspath(directory)
msg['To'] = ', '.join(args.recipients)
msg['From'] = args.sender
msg.preamble = 'You will not see this in a MIME-aware mail reader.\n'
Thanks @carlbordum for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
…nGH-14751) (cherry picked from commit 8efade9) Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
GH-14760 is a backport of this pull request to the 3.8 branch. |
…nGH-14751) (cherry picked from commit 8efade9) Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
GH-14761 is a backport of this pull request to the 3.7 branch. |
) (cherry picked from commit 8efade9) Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
) (cherry picked from commit 8efade9) Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
https://bugs.python.org/issue36261