Multipart.rb is a project mainly written in Ruby, it's free.
Ruby module for parsing multipart emails
rmailmod is a ruby module for parsing multipart emails in RFC 2822 format. An email is a wrapper for a part. Every part has a header, body and sometimes nested parts.
ruby rmailmod.rb
Next steps might be to parse 'Received' headers into an array in the Header object. That would allow easy access the 'Received' header chain for features like spam detection. Perhaps also add support for a queue or collection of emails. Also need to add Parser::collect_attachments and Email#attachments to collect and access attached files.
This software may be redistributed under the terms specified in the MIT-LICENSE file.