Parsing the details via DotNet in efficient manner

Hi @margarita.samodurova how do i differentiate inline images and attachment in MapiAttachment, i could notice for a specific file IsInlineImage property always return false even for inline image

Hello @Devishree,

Could you please provide a sample MSG file where an inline image exists, but the IsInline property returns false? This would help us analyze the issue.

Outlook (2).zip (655.3 KB)
Inbox folder has mail with subject HTML body, this mail has around 12 inline images all are sent as attachments

Hi @margarita.samodurova is there any property that represents total number of thread count for a conversation ?

Thank you for providing pst file. We are investigating this issue and will update you on our findings.

No, there isn’t a direct MAPI property that represents the total number of messages (thread count) in a conversation.

okay thanks, TryToGetFolderById() this method in PersonalStorage will this give me folder info even it is a subFolder ?

Hello @Devishree.

Yes, TryToGetFolderById() in PersonalStorage will return folder information even if the folder is a subfolder. This method searches for a folder by its entry ID within the entire PST file hierarchy, not just at the root level.

Hi @margarita.samodurova thanks for the above confirmation, is there any property available in MapiMessages that is equivalent of EntryIdString of MessageInfo ?

Hello @Devishree,

No, the MapiMessage class does not have a property equivalent to the EntryIdString of MessageInfo.
Note, that once a message is extracted from a PST file, it is no longer associated with any storage. Therefore, the EntryId does not have any meaning for an individual MapiMessage, as this identifier is only relevant within the PST file.
However, when working with a PST file, you can obtain the EntryId of a message using MessageInfo before extracting the MapiMessage.

@Devishree

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): EMAILNET-41537

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Hi @margarita.samodurova, how should i update just the read status of list of mails in particular folder is this achievable without getting existing flag value for each mail and updating the read status of it ? Also do we have any methods to delete all mails from a folder?

Hello @Devishree,

In a PST file, it is not possible to set the read status without first retrieving the existing flag value.

Here’s an example of how to delete emails from Inbox using the DeleteChildItems method.

using (PersonalStorage pst = PersonalStorage.FromFile("sample.pst"))
{
    // Get the target folder (e.g., Inbox)
    FolderInfo inbox = pst.RootFolder.GetSubFolder("Inbox");

    // Get all messages in the folder
    MessageInfoCollection messages = inbox.GetContents();

    // Collect Entry IDs of all messages
    List<string> entryIdList = new List<string>();
    foreach (MessageInfo message in messages)
    {
        entryIdList.Add(message.EntryId);
    }

    // Delete all collected messages at once
    if (entryIdList.Count > 0)
    {
        pst.DeleteChildItems(entryIdList);
    }
}

Hello @margarita.samodurova do we have any plans to support search with pagination ? Also do we have any doc on how to use orderByString param in MailQuery class

Hi @alexander.pavlov where can i track this issue status ?

Hi @Devishree ,
This issue is resolved and closed. The fix is ​​available since version Aspose.Email 25.3

okay thanks will check and update

Hello @Devishree,

You can use the MailQuery(String queryString, String orderByString) constructor to apply sorting. For example:

MailQuery mailQuery = new MailQuery(
    "(('From' Contains 'test@test.com') & ('SentDate' >= '12-May-2010'))",
    "(('From' OrderBy 'ASC') & ('SentDate' OrderBy 'DESC'))"
);

This allows you to filter messages using the queryString and sort the results using the orderByString clause.

Regarding support for search with pagination — we are already working on it.

Thanks, what does InternalDate represents in the MailQueryBuilder ? Do we have query to sort by delivery time of mails ?

@Devishree,

The InternalDate property in MailQueryBuilder is used for querying messages based on the date they were added to the mailbox on the mail server. However, please note that InternalDate does not work when searching in PST files.

For PST searches, you should use the SentDate property instead. This allows to search based on the MAPI property PidTagClientSubmitTime.

Please also note that the property PidTagMessageDeliveryTime is not available through the MessageInfo object, which is why sorting or filtering by the actual delivery time of messages is not possible using that object.