This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Alex Corcoles
Recipients Alex Corcoles, barry, r.david.murray
Date 2018-10-10.16:55:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

This is something that has hit us a few times, as we write a significant quantity of software which parses email messages.

The thing is, we use email.header.decode_header to decode the Subject: header and it is pretty common for headers to be word-wrapped. If they are, decode_header will return a string with newlines in it.

This is something which is unexpected for many people, and can cause bugs which are very difficult to detect in code review or testing, as it's easy to not trigger wordwrapping if not done deliberately.

We would humbly suggest to provide a friendly way to get an email's subject in the expected fashion (i.e. with no newlines) or point out this caveat in the docs (or maybe change decode_header to remove newlines itself).

Kind regards,

Date User Action Args
2018-10-10 16:55:29Alex Corcolessetrecipients: + Alex Corcoles, barry, r.david.murray
2018-10-10 16:55:29Alex Corcolessetmessageid: <>
2018-10-10 16:55:29Alex Corcoleslinkissue34954 messages
2018-10-10 16:55:29Alex Corcolescreate