monde/mms2r — Issue #13: UTF-8 error with yahoo email
Author: warriorp
Created: 2012-01-10 16:31:37+00:00
State: open

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"