Mime4j is an email parsing software that offers a MimeStreamParser tool which can identify and parse email message streams in both plain rfc822 and MIME format.
One thing to note is that the parser in mime4j only focuses on the structure of the message stream, rather than decoding any base64 or quoted-printable encoded header fields and bodies. This intentional design choice ensures that the parser provides the most basic functionality needed to create more complex parsers. However, decoding bodies and fields is not impossible, as the Message class in mime4j contains facilities designed to handle it transparently.
You'll be happy to know that the parser has been designed to be tolerant against messages that violate standards, making it especially versatile. The software has been tested using a large corpus of over 5000 e-mail messages and benchmarked against the widely used perl MIME::Tools parser. The results of the comparison note that mime4j and MIME:Tools rarely differ. All in all, this software is an excellent choice for those in need of a reliable e-mail message parser.
Version 0.4: N/A