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

UTF-8 error with yahoo email #13

Closed
warriorp opened this issue Jan 10, 2012 · 1 comment
Closed

UTF-8 error with yahoo email #13

warriorp opened this issue Jan 10, 2012 · 1 comment

Comments

@warriorp
Copy link

I am trying to parse yahoo emails in order to extract their body of plain text and ignore the attachments. I first put the received email through the MAIL gem's receive function and then it goes through MMS2R after which I run regular expressions on mail.body but the problem is that after MMS2R parses the yahoo email, it somehow corrupts the body field so when I go mail.body it gives me

ArgumentError (invalid byte sequence in UTF-8):
app/controllers/emails_controller.rb:25:in `create'

mail.body works fine upto the point where I go "email = MMS2R::Media.new(mail)"

It seems to work fine with gmail, hotmail and every other web client except for yahoo. Is this a known issue? I am using
"ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2011.03"

@monde
Copy link
Owner

monde commented Jan 11, 2012

As I said in our email correspondance, I would be more than happy to try to replicate the issue in my development environment, but a I need the original email data to do so. When you send me a sample, please zip or tar it before sending so that the email data itself is not modified before I get it. The original email data has information in its headers that is important inspect, and if you only send me text output of your software I have no way to determine if the encoding issue is because of MMS2R code, because of Ruby stack you ran it on, or because of your coding implementation.

@monde monde closed this as completed Jan 11, 2012
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

2 participants