Using Aspose Email for Java we’re encountering client created PSTs (some from Office365 Legal Hold Export [https://community.office365.com/en-us/f/158/t/248944 ](https://community.office365.com/en-us/f/158/t/248944)) that do not have the emails stored within a folder. Rather it looks like they’ve stored the emails in the “root” of the PST. Aspose Email thinks these PSTs are empty.
We were able to take a PST from the Enron dataset and move the messages from the INBOX to the root to re-create the issue. File is attached.
We have tested your sample PST with the latest version of Aspose.Email for Java 6.2.0 and were not able to face the issue you have shared with us. The following code sample shows the correct number of items at the root folder of the PST. Please try the following code at your end with the latest version of the API and share your feedback with us for further assistance.
Ah yes you’re correct. So I took another look at my code and I split the PSTs into chunks before loading them up. Turns out the error is in the split PSTs. Somehow the splitting process doesn’t include the messages at the root of the PST.
PersonalStorage pst = PersonalStorage.fromFile("692316\\albert_meyers_000_1_root.pst");
System.out.println(pst.getRootFolder().getContentCount());
// Set up chunk dir
File chunksLocation = new File("/tmp/chunks");
chunksLocation.mkdirs();
// Split PST (any number of chunks)
try {
pst.splitInto(50000000, chunksLocation.getPath());
} finally {
pst.dispose();
}
for(File file: chunksLocation.listFiles()) {
PersonalStorage pstPart = PersonalStorage.fromFile(file.getPath());
System.out.println(pstPart.getRootFolder().getContentCount());
}
We were able to reproduce the problem at our end and have logged it as EMAILJAVA-33570 in our issue tracking system for further investigation by our Product team. We’ll update you here as soon as there is some information available about the status of this ticket.
Can you please share the details of your requirement that you intend to look in Aspose.Email to offer you. Please share the source information and desired output as well.
Please provide the sample file along with used sample code. Please also share the desired output as well and we will investigate that further to help you. You can also visit documentation article, Splitting and Merging PST Files for available options.