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

IETF PARSING FAIL exception when trying to read most emails #2

Closed
bjeanes opened this issue Dec 11, 2009 · 2 comments
Closed

IETF PARSING FAIL exception when trying to read most emails #2

bjeanes opened this issue Dec 11, 2009 · 2 comments
Labels

Comments

@bjeanes
Copy link

bjeanes commented Dec 11, 2009

I suspect this has to do with your problem in README: "May not correctly read malformed MIME messages. This could possibly be corrected by having IMAP parse the MIME structure"

If this is the case, how much work will be needed to parse the MIME structure with IMAP? It'd be good to be able to read all messages that GMail itself can read.

Thanks for the great work!

@dcparker
Copy link
Owner

Most emails? Wow .. it's worked for all emails I've tried it on so far...
Are there any you'd be willing to send me a copy of one that it can't read? (the raw body content, you can get that from .body instead of .message)

If it ends up being something that's in the spec but the parser just wasn't built right to handle it, I'll fix the parser. If it's something that goes against the spec, I'll see if it's something I can let the parser allow or not. We can't make it work for faulty messages at the expense of proper ones, after all.

@dcparker
Copy link
Owner

bjeanes noted in email that this is actually only failing on all messages in a particular thread. However, my gem on my end was able to parse one of those messages just fine...

Change entity.rb, line 15 to:
@raw = arg.gsub(/\r\r+/, "\r").gsub(/([^\r])\n/, "\1\r\n")

and see if that fixes it.

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

No branches or pull requests

2 participants