Email subjects were displaying as raw RFC 2047 encoded strings (e.g. =?UTF-8?Q?New_Reward_Alert:_Take_$5_off?=) instead of readable text, across Gmail and IMAP accounts. Beyond display, encoded subjects also broke keyword classification — a security email with an encoded subject would classify as Unknown because the classifier never saw the decoded text.
Fixed by adding a normalize_message_headers pass at the top of the scan pipeline (before classify_full and before DB storage), covering all providers. IMAP envelope subject and From display names are also decoded at construction time. Outlook is unaffected (Graph API pre-decodes headers).
Already-stored garbled subjects clear on next rescan.
VirusTotal scan results: