parsemail
parsemail copied to clipboard
can't parse correctly Content-Type:text/html
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
Fixed here: https://github.com/OfimaticSRL/parsemail
Fixed here: https://github.com/OfimaticSRL/parsemail
fixed base64 decoder?
Yes. In most cases