Hi,
I’ve been working on a utility that opens up a PST file, then saves the messages to disk. The issue I have is that when I index them, each message reply is treated as a new/separate message and I can’t find a way to tie them together.
Is there a ConversationID or ThreadID that ties all the messages together?
TIA.
@dchurch24
In case you are using old version of Aspose.Email, we suggest you please upgrade to the latest version of Aspose.Email for .NET 22.2. Hope this helps you.
If you still face problem, please ZIP and attach your input and output PST files along with source code without compilation errors that helps us to reproduce your problem on our end. We will investigate the issue and provide you more information on it.
Hi. I am using version 22.2.0 already.
Are you saying that there is an option to get to a conversation/thread ID in this version?
@dchurch24
To investigate your issue, we need the requested resources. Please attach the following resources here for testing:
Yeah…no. I don’t have an issue, I’m trying to find out if there is a way, once I have opened a PST file and reading through messages, to get a ThreadID, or ConversationID - something that ties any replies to the parent/original message.
Excellent. Thank you.
There’s no way to get to that from the MessageInfo class, is there?
@dchurch24
Could you please provide sample PST file here for our reference? We will then provide you code example to get the ConversationId.
Hi, thanks for the offer, but I can’t do that.
I have one sample PST file that contains sensitive information (and is really quite large as well: 2.1GB).
@dchurch24
We are working over your query and will get back to you soon.
1 Like
@dchurch24
We have logged your requirement as EMAILNET-40565 in our issue tracking system. We will inform you via this forum thread once there is an update available on it.
@dchurch24
Please use the following code example to achieve your requirement.
string path = MyDir + "input.pst";
using (PersonalStorage pst = PersonalStorage.FromFile(path))
{
FolderInfo inbox = pst.RootFolder.GetSubFolder("Inbox");
foreach (MessageInfo messageInfo in inbox.EnumerateMessages())
{
var msg = pst.ExtractMessage(messageInfo);
var prop = msg.Properties[KnownPropertyList.ConversationId];
if (prop != null)
{
var conversationId = prop.Data;
}
}
}
Hi, thank you.
I think I must have misunderstood what “conversationID” is. I need to be able to tie subsequent message replies back to the original email.
I’ll keep hunting
Cheers.
@dchurch24
Please let us know about your exact requirement. We will then log your requirement according to your requirement.
I need to be able to tie subsequent messages (replies) together with the original email.
I need to find some commonality between them that shows they are part of the same conversation. I thought, from reading the docs, that ConversationID was what I was after, but after using the code above, it appears that I’ve misinterpreted what that is, as it returns [null] for every message, including messages that I know are part of a reply.
@dchurch24
Unfortunately, Aspose.Email does not provide API to achieve the shared requirement. However, we have logged it in our issue tracking system. We will inform you via this forum thread once there is an update available on it.
@dchurch24
Please check the attached code Visual Studio project to get ConversationID. Hope this helps you.
ConversationThread.zip (4.8 KB)
Can you make ZIP public? I can’t download it.
Hello @NPozdniakov,
That example can be found here.