I found this example for parsing an email: http://www.mozgoweb.com/posts/how-to-parse-mime-message-using-mime4j-library/
But the example is not working, because import org.apache.james.mime4j.message.Message; is not working.
How can I create a Message from a file?
MessageImpl mimeMsg = new MessageImpl();
//Get some standard headers
System.out.println("To: " + mimeMsg.getTo().toString());
System.out.println("From: " + mimeMsg.getFrom().toString());
System.out.println("Subject: " + mimeMsg.getSubject());
You need this jar in your classpath:
http://central.maven.org/maven2/org/apache/james/apache-mime4j/0.6.1/apache-mime4j-0.6.1.jar
Dependency For maven: