monde/mms2r — pull request #14 by minimul (2012-01-19 12:27:16+00:00)
Title: Invalid byte seq outlook

Hi, I recently upgraded Simplton to Ruby 1.9 and Rails 3.1. Using mms2r 3.5.1. Started getting this error on certain Outlook emails (one from desktop client and one from Android client)

invalid byte sequence in UTF-8
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/mail-2.3.0/lib/mail/core_extensions/string.rb:12:in `=~'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/mail-2.3.0/lib/mail/core_extensions/string.rb:12:in `!~'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/mail-2.3.0/lib/mail/core_extensions/string.rb:12:in `blank?'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/mms2r-3.5.1/lib/mms2r/media.rb:269:in `body'

This test included in this branch will reproduce this error. The test fixture email has been sanitized and purged of private information.

I have made this [commit](https://github.com/minimul/mms2r/commit/8f614579de34d45e14d3fb41fa0a9332bd3367b1) to my forked mms2r master and incoming email has been working fine thus far.

Thanks for mms2r!