We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
GitHub fields:
assignee = None closed_at = <Date 2021-06-21.14:27:56.650> created_at = <Date 2021-06-11.14:15:26.350> labels = ['3.11', 'expert-email', '3.10', '3.9'] title = 'email.message as_string() not writing unixfrom' updated_at = <Date 2021-06-21.14:27:56.649> user = 'https://bugs.python.org/konstantin2'
bugs.python.org fields:
activity = <Date 2021-06-21.14:27:56.649> actor = 'corona10' assignee = 'none' closed = True closed_date = <Date 2021-06-21.14:27:56.650> closer = 'corona10' components = ['email'] creation = <Date 2021-06-11.14:15:26.350> creator = 'konstantin2' dependencies = [] files = [] hgrepos = [] issue_num = 44395 keywords = ['patch'] message_count = 4.0 messages = ['395635', '396247', '396248', '396249'] nosy_count = 6.0 nosy_names = ['barry', 'r.david.murray', 'corona10', 'miss-islington', 'FFY00', 'konstantin2'] pr_nums = ['26685', '26828', '26829'] priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue44395' versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']
The text was updated successfully, but these errors were encountered:
When using as_string(unixfrom=True), the "From " line is not always printed. The behaviour is correct for as_bytes().
Test case:
----
import email.message msg = email.message.EmailMessage() msg.set_payload('Hello World\n') msg.set_unixfrom('From foo@bar Thu Jan 1 00:00:00 1970') msg['Subject'] = 'Hello' msg['From'] = 'Me <me@foo.bar>' print('as_string:') print(msg.as_string(unixfrom=True)) print('as_bytes:') print(msg.as_bytes(unixfrom=True).decode())
Results (3.5 and 3.9):
as_string: Subject: Hello From: Me <me@foo.bar>
Hello World
as_bytes: From foo@bar Thu Jan 1 00:00:00 1970 Subject: Hello From: Me <me@foo.bar>
Sorry, something went wrong.
New changeset 30f7a77 by Dong-hee Na in branch 'main': bpo-44395: Fix MIMEPart.as_string to pass unixfrom properly (GH-26685) 30f7a77
New changeset 20a1495 by Miss Islington (bot) in branch '3.10': bpo-44395: Fix MIMEPart.as_string to pass unixfrom properly (GH-26685) 20a1495
New changeset 67b3a99 by Miss Islington (bot) in branch '3.9': bpo-44395: Fix MIMEPart.as_string to pass unixfrom properly (GH-26685) 67b3a99
No branches or pull requests
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: