I ended up using the MMS2R library and it was quite simple and did
exactly what I needed.

MMS2R is here: http://rubyforge.org/projects/mms2r/

I installed it using the gem command:

   sudo gem install mms2r

Added this to the top of my ActionMailer file:

   require 'mms2r'

Then all I needed to do to get the text only version of the body of an
incoming message was this:

(inside my receive(mail) handler)

mms = MMS2R::Media.new(mail)
plain_body_text = mms.body

The only catch I encountered was that I wanted to extract MMS2R into
my vendor/gems directory but I really had a difficult time finding all
of the dependencies. I ended up punting and simply installing the gem
on my server as well, though I would rather not do that.

I hope this helps anyone searching for this kind of capability.

--David
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to