Load Email Message using Aspose.Email and Apache POI HSMF

Aspose.Email - Load Email Messages

Load different type of email messages

Java


 //Create MailMessage instance by loading an Eml/Msg/Emlx/Mht file

MailMessage messageMSG 	= MailMessage.load(dataDir + "message.msg");

MailMessage messageEML 	= MailMessage.load(dataDir + "message.eml");

MailMessage messageEMLX = MailMessage.load(dataDir + "message.emlx");

MailMessage messageMHT 	= MailMessage.load(dataDir + "message.mht");

Apache POI HSMF - Load Email Messages

Java


 String filename = dataDir + "message.msg";

MAPIMessage msg = new MAPIMessage(filename);

Download Running Code

Download Sample Code