Forwarded mails (e.g. Yandex webmail) arrive as a single text/html part
with no <html>/<body> wrapper and no text/plain alternative. Two bugs made
their codes unextractable:
- stripHtmlTags dropped href attributes, so button-only mails (Netflix
'Get Code') reached the LLM with no URL at all → codeExist=0.
Anchors now render as 'label [url]' with & decoded.
- extractMailBodies only recognised single-part HTML wrapped in
<html>/<body>, so htmlBody was null and the Rendered preview was empty.
A bare fragment with Content-Type text/html now counts as the html body.
Verified against the real forwarded Netflix mail from production raw_mails:
content now carries the travel/verify link and classifies 5/5 as
login_code.