Hello Team,
we are extracting EntryIds from PST file using some other Tools.
Now we want ASpose to use that EntryId and Extract Metadata and attachments.
Here from Reference document, I can see there is no direct way to get Message from PST using provided EntryId.
it has to write code as below,
private MailMessage FindMessageByEntryId(FolderInfo folder, string entryId)
{
foreach (MessageInfo messageInfo in folder.EnumerateMessages())
{
if (messageInfo.EntryIdString.Equals(entryId, StringComparison.OrdinalIgnoreCase))
{
return folder.GetMessage(messageInfo);
}
}
// Recurse into subfolders
foreach (FolderInfo subFolder in folder.GetSubFolders())
{
MailMessage msg = FindMessageByEntryId(subFolder, entryId);
if (msg != null)
return msg;
}
return null;
}
so is there any other suggestion or Method that we can use for fast navigation to access object using entryId.
Please advise.
Thanks