Hello,
I am currently evaluating Aspose.Email for Java, by testing a server process that is creating a PST file containing a specified number of mail messages. The purpose of the test is to verify performance and compatibility. The server process completes with out any errors being reported regardless of the final PST file size.
However, Outlook 2016 can only successfully open PST files created by Aspose.Email for Java when the file is less than 4 GB in size. Once the PST file exceeds 4 GB, when the file is opened, Outlook aborts and then tries to recover the file.
Server:
Aspose.Email for Java 6.2.0.0 with Temporary License Red Hat Enterprise Linux Server release 6.5 (Santiago) 64bit OS Java SDK 1.8.0_73 (64bit)
Client:
Windows 8.1 Outlook 2016
---- Windows Error (Japanese):
このファイルで見つかったエラー:修復の必要なアイテム: 49495
見つからないアイテム: 0
フォルダーのないアイテム: 0フォルダーのないアイテムは、保存先不明フォルダーに入れられます。
----
The result after recovering the PST file is 55,495 of 60,000 messages remain.
According to other posts, the Aspose.Email API does not impose a size limitation on PST files.
Is there a way to create PST files larger than 4 GB that Outlook 2016 can successfully open?
Sample Code being used:
package test;import com.aspose.email.FileFormatVersion;
import com.aspose.email.FolderInfo;
import com.aspose.email.MailMessage;
import com.aspose.email.MapiConversionOptions;
import com.aspose.email.MapiMessage;
import com.aspose.email.PersonalStorage;
import java.util.List;public class SampleMakePST {
public static void makePst(String filename, List emlFileList) {
PersonalStorage ps = null;
try {
ps = PersonalStorage.create(filename, FileFormatVersion.Unicode);
FolderInfo rf = ps.getRootFolder();
FolderInfo sr = rf.addSubFolder(“Results”);
FolderInfo sub = null;
MapiConversionOptions opts = MapiConversionOptions.getUnicodeFormat();
opts.setPreserveOriginalAddresses(true);
opts.setPreserveOriginalDates(true);
opts.setPreserveSignature(true);
opts.setUseBodyCompression(true);
int nextidx = 0;
int folderidx = 0;
int i = 0;
for (String emlFile : emlFileList) {
nextidx = i / 10000;
if ((sub == null) || (folderidx != nextidx)) {
folderidx = nextidx;
sub = sr.addSubFolder(String.format("%04d", nextidx));
}
MailMessage eml = MailMessage.load(emlFile);
MapiMessage msg = MapiMessage.fromMailMessage(eml, opts);
sub.addMessage(msg);
msg.dispose();
eml.dispose();
i++;
}
} finally {
if (ps != null) {
ps.dispose();
}
}
}
}