Load Email Message using Aspose.Email and Apache POI HSMF
Contents
[
Hide
]
Aspose.Email - Load Email Messages
The load method exposed by MailMessage class can be called by developers to 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
Apache POI HSMF provides MAPIMessages constructor which takes filename to load new MAPIMessage.
Java
String filename = dataDir + "message.msg";
MAPIMessage msg = new MAPIMessage(filename);
Download Running Code
Download Sample Code
For more details, visit Update and Save an Email.