Home > mms-mime

mms-mime

Mms-mime is a project mainly written in Ruby, based on the MIT license.

Ruby parser for MM7-wrapped MMS/MIME messages

= mms-mime

This gem was written with a simple aim to parse MM7 wrapped binary and base64 encoded MMS messages received via MM7/XML HTTP post from an MM7 compatible gateway connection (such as OpenWave, OpenMarket, etc).

The gem provides a simple way to parse and access MMS message contents, such as from, to, subject and content parts (including image and text parts).

== Usage

require 'mms-mime'

p = Mime::Mms::Parser.new :bytes => env['rack.input'].read
m = p.parse

m.subject     => "Hello!"
m.text        => "Test MM"
m.from        => "77777"
m.to          => "14155556666"

File.open("image.jpg","w") { |f| f.write m.image_parts.first.body }

== Contributing to mms-mime

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

== Copyright

Copyright (c) 2011 Konstantin Gredeskoul. See LICENSE.txt for further details.