Supporting Software
A number of implementations of decoding algorithms are available on the Internet. Rather than attempt to roll your own, you may find it more beneficial to use one that’s already written and that has a compatible licensing scheme to support your software. Here are some places to start.
Zeegee Software has a set of PERL modules for MIME processing:http://www.zeegee.com/code/perl/MIME-tools
Mimetic is a GPL MIME library written in C++:http://mime.codesink.org/mimetic_mime_libraryl
ripMIME is a C tool for ripping out MIME attachments:http://pldaniels.com/ripmime
Hunny JMIME is a commercial set of Java classes for MIME extraction:http://www.hunnysoft.com/jmime