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 fdrake
Recipients barry, fdrake, r.david.murray
Date 2019-10-28.16:47:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1572281263.86.0.289924184677.issue38621@roundup.psfhosted.org>
In-reply-to
Content
I've encountered a problem parsing an email with this Subject: header:

Subject: Be sure to redeem your =?utf-8?Q?$?=201.71 credit card reward
 certificate by the end of the year

email._header_value_parser.get_unstructured defers to get_encoded_word, passing the argument

  '=?utf-8?Q?$?=201.71 credit card reward certificate by the end of the year'

get_encoded_word eventually calls email._encoded_words.decode with the argument

  '=?utf-8?Q?$?=201.71 credit card reward certificate by the end of the year?='

This doesn't seem right, but I'm unsure of the syntactic priority of =XX and ?= in this case.

The policy for this is email.policy.SMTP + email.policy.strict (not sure if that's ideal; I'm retrieving messages from mbox files and over IMAP).
History
Date User Action Args
2019-10-28 16:47:43fdrakesetrecipients: + fdrake, barry, r.david.murray
2019-10-28 16:47:43fdrakesetmessageid: <1572281263.86.0.289924184677.issue38621@roundup.psfhosted.org>
2019-10-28 16:47:43fdrakelinkissue38621 messages
2019-10-28 16:47:43fdrakecreate