TheProjecter / ruby-msg

Automatically exported from code.google.com/p/ruby-msg
MIT License
0 stars 0 forks source link

= Introduction

Generally, the goal of the project is to enable the conversion of msg and pst files into standards based formats, without reliance on outlook, or any platform dependencies. In fact its currently pure ruby, so it should be easy to get running.

It is targeted at people who want to migrate their PIM data from outlook, converting msg and pst files into rfc2822 emails, vCard contacts, iCalendar appointments etc. However, it also aims to be a fairly complete mapi message store manipulation library, providing a sane model for (currently read-only) access to msg and pst files (message stores).

I am happy to accept patches, give commit bits etc.

Please let me know how it works for you, any feedback would be welcomed.

= Features

Broad features of the project:

Features of the msg format message store:

Features of the pst format message store:

= Usage

At the command line, it is simple to convert individual msg or pst files to .eml, or to convert a batch to an mbox format file. See mapitool help for details:

mapitool -si some_email.msg > some_email.eml mapitool -s *.msg > mbox

There is also a fairly complete and easy to use high level library access:

require 'mapi/msg'

msg = Mapi::Msg.open filename

access to the 3 main data stores, if you want to poke with the msg

internals

msg.recipients

=> [#<Recipient:'\'Marley, Bob\' bob.marley@gmail.com'>]

msg.attachments

=> [#, #]

msg.properties

=> #<Properties ... normalized_subject='Testing' ...

creation_time=#<DateTime: 2454042.45074714,0,2299161> ...>

To completely abstract away all msg peculiarities, convert the msg to a mime object. The message as a whole, and some of its main parts support conversion to mime objects.

msg.attachments.first.to_mime

=> #

mime = msg.to_mime puts mime.to_tree

=>

= Thanks

= Other

For more information, see