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

Text of email is not properly decoded #86

Closed
mbrio opened this issue May 28, 2014 · 4 comments
Closed

Text of email is not properly decoded #86

mbrio opened this issue May 28, 2014 · 4 comments

Comments

@mbrio
Copy link

mbrio commented May 28, 2014

I'm testing against a gmail account, I've received a few emails from other sources, and have sent myself both text and html emails. When I parse the emails my text property always comes back with boundaries in place, and if it's an email with both HTML and text the property contains both:

Plain text:

--001a1136b5c069839604fa64cc09--
Here is a test of plain text

HTML + Plain text:

--089e0149d0e44917e904fa7682fc
Content-Type: text/plain; charset=UTF-8

Now here is an HTML version

--089e0149d0e44917e904fa7682fc
Content-Type: text/html; charset=UTF-8

<div dir="ltr">Now here is an HTML version</div>

--089e0149d0e44917e904fa7682fc--

Is this how the text property is supposed to behave? All other properties get properly parsed, just not the body.

@andris9
Copy link
Member

andris9 commented May 28, 2014

Could you paste the entire message, otherwise i can't see if there is anything wrong with it or not.

@mbrio
Copy link
Author

mbrio commented May 29, 2014

As soon as I get in front of a computer I will pass it on but for more info the account I'm checking is a Gmail account, and the emails that are not being decoded properly are being sent from another Gmail account, from the web interface. All emails being sent from the web interface are not being decoded properly for me.

@mbrio
Copy link
Author

mbrio commented May 30, 2014

In getting you the contents of the email I inadvertently fixed my own problem. I was using node-imap in conjunction with mailparser. My fetch call was only requesting the to, from, date, and subject headers, along with the text. Apparently when requesting only some headers the body of the email is no longer able to be parsed. When I requested the email in its entirety it parsed correctly.

@andris9 andris9 closed this as completed May 31, 2014
@danbraik
Copy link

In getting you the contents of the email I inadvertently fixed my own problem. I was using node-imap in conjunction with mailparser. My fetch call was only requesting the to, from, date, and subject headers, along with the text. Apparently when requesting only some headers the body of the email is no longer able to be parsed. When I requested the email in its entirety it parsed correctly.

Thank you, you saved my life !

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