parsemail icon indicating copy to clipboard operation
parsemail copied to clipboard

can't parse correctly Content-Type:text/html

Open wenhw opened this issue 4 years ago • 3 comments

INPUT:

Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 From: Private Person [email protected] To: A Test User [email protected] Subject: Hi HTML Smtpman

ICAgIDxodG1sPgogICAgPGJvZHk+CiAgICA8aDE+VGhpcyBpcyBhIHRlc3QgZS1tYWlsIG1lc3Nh Z2UuPC9oMT4KICAgIDxib2R5PgogICAgPC9odG1sPgogICAg

OUTPUT:

email, err := parsemail.Parse(strings.NewReader(raw))

email.HTMLBody:

ICAgIDxodG1sPgogICAgPGJvZHk+CiAgICA8aDE+VGhpcyBpcyBhIHRlc3QgZS1tYWlsIG1lc3Nh Z2UuPC9oMT4KICAgIDxib2R5PgogICAgPC9odG1sPgogICAg

Should decode base64

wenhw avatar Jun 16 '20 06:06 wenhw

Fixed here: https://github.com/OfimaticSRL/parsemail

xhit avatar Jan 06 '23 18:01 xhit

Fixed here: https://github.com/OfimaticSRL/parsemail

fixed base64 decoder?

AlexJujushvili avatar Feb 17 '23 20:02 AlexJujushvili

Yes. In most cases

xhit avatar Feb 17 '23 22:02 xhit