Processing MS Outlook .msg files

Hi All, We have a requirement to process and parse .msg files in a consistent html format to display in a Mendix application. I have looked at the Apache Tika library and it provides exactly what I need.  However my application is already relying on bouncy castle libraries and because BC is also packaged in the tika-app jar it causes a security exception that the tika-app jar is not signed. Self-signing the jar also does not work. I am looking for any ideas or suggestions to resolve the tika library security issue or any alternatives. I also have access to the raw RTF email body.   com.mendix.core.CoreException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: Error parsing PKCS private key for Box Developer Edition.     at com.mendix.basis.component.InternalCore.execute(   Caused by: org.bouncycastle.operator.OperatorCreationException: 1.2.840.113549.1.5.13 not available: JCE cannot authenticate the provider BC     at org.bouncycastle.openssl.jcajce.JceOpenSSLPKCS8DecryptorProviderBuilder$1.get(Unknown Source)     at org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo.decryptPrivateKeyInfo(Unknown Source)     at     at   Caused by: java.util.jar.JarException: file:/C:/Users/*********/Documents/Mendix/**********/deployment/model/lib/userlib/tika-app-1.17.jar is not signed by a trusted signer.     at javax.crypto.JarVerifier.verifySingleJar(     at javax.crypto.JarVerifier.verifyJars(     at javax.crypto.JarVerifier.verify(     at javax.crypto.JceSecurity.verifyProviderJar(     at javax.crypto.JceSecurity.getVerificationResult(   Thanks
1 answers


An alternative might be found here:

[update 12-02-2018]

Another alternative might be found on:

This has an option to convert the body to html like the example below:


import com.auxilii.msgparser.Message;
import com.auxilii.msgparser.MsgParser;

public class ParseMsg {

	public static void main(String[] args) throws UnsupportedOperationException, IOException {
		MsgParser msgp = new MsgParser();
		Message msg = msgp.parseMsg("mail.msg");


Did some tests with a couple of mails. The outcome is quite good for simple mails. More complex mails with images and tables etc. do not return correctly as html. But it depends on your needs, so this might be a valid option. It uses POI under the hood.