We are working on stuff that deal with PST, so we are trying to create using java-libpst sample code. It work fine for me, but we need to show the details of PST, like PST name, configured email account on given PST.
I want to show email address and the name of given address of given PST.
public Test(String filename) {
try {
PSTFile pstFile = new PSTFile(filename);
PSTFolder pstFolder=pstFile.getRootFolder();
System.out.println(pstFile.getMessageStore().getDisplayName());
processFolder(pstFile.getRootFolder());
} catch (Exception err) {
err.printStackTrace();
}
}
pstFile.getMessageStore().getDisplayName()
show imap.gmail.com and we want two more thing like my email address configured is : [email protected] and name is : My Name.
How can I get this two properties using java-libpst?
You have misinterpreted how PST files work. The Message Store contains very little data; in fact, only five properties are required to be present. The Display Name (returned by com.pff.PSTMessageStore.getDisplayName is the name of the PST file, but data the mailbox owner's identity (including email address and full name) is not stored here or in any other place in the PST file.