Skip to content

bpo-36261: email example was misusing preamble field#14751

Merged
zooba merged 1 commit into
python:masterfrom
carlbordum:bpo36261-preamble-example
Jul 14, 2019
Merged

bpo-36261: email example was misusing preamble field#14751
zooba merged 1 commit into
python:masterfrom
carlbordum:bpo36261-preamble-example

Conversation

@carlbordum

@carlbordum carlbordum commented Jul 13, 2019

Copy link
Copy Markdown
Contributor

@mangrisano mangrisano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.

@aeros aeros left a comment

Copy link
Copy Markdown
Contributor

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'

@zooba zooba merged commit 8efade9 into python:master Jul 14, 2019
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @carlbordum for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 14, 2019
…nGH-14751)

(cherry picked from commit 8efade9)

Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
@bedevere-bot

Copy link
Copy Markdown

GH-14760 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 14, 2019
…nGH-14751)

(cherry picked from commit 8efade9)

Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
@bedevere-bot

Copy link
Copy Markdown

GH-14761 is a backport of this pull request to the 3.7 branch.

miss-islington added a commit that referenced this pull request Jul 14, 2019
)

(cherry picked from commit 8efade9)

Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
miss-islington added a commit that referenced this pull request Jul 14, 2019
)

(cherry picked from commit 8efade9)

Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants