Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wenhw opened this issue Jun 16, 2020 · 3 comments
Open

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

wenhw opened this issue Jun 16, 2020 · 3 comments

Comments

@wenhw
Copy link

wenhw commented Jun 16, 2020

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

@xhit
Copy link

xhit commented Jan 6, 2023

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

@AlexJujushvili
Copy link

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

fixed base64 decoder?

@xhit
Copy link

xhit commented Feb 17, 2023

Yes. In most cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants