Hi,
Hi Ram,
Thank you for your interest in Aspose.Email.
Your excitement is justified in the sense that you really don’t need to have Outlook or Exchange installed on your PC for creating and manipulating a PST file. Please download the latest version of Aspose.Email for Java 5.1.0 from our product download page and get started with the following sample code that adds EML messages to the PST.
Please note that there are certain evaluation limitations of the product that you can avoid by requesting a 30-day temporary license free of cost. We have a complete section for working with PST files that you can visit to get an idea of working with different areas of a PST file. In case of any confusion/inquiry, please feel free to contact us here.
Code:
//create the PST
PersonalStorage pst = PersonalStorage.*create*("MyPstFile.pst", FileFormatVersion.*Unicode* );
//add a test folder to PST
FolderInfo fi = pst.getRootFolder().addSubFolder("Test");
//Load an EML from disc
MailMessage eml = MailMessage.*load*("a.eml", MailMessageLoadOptions.*getDefaultEml*());
//Convert this to MapiMessage
MapiMessage mapiMsg = MapiMessage.*fromMailMessage*(eml);
//add to the folder
fi.addMessage(mapiMsg);
//dispose the pst
pst.dispose();