开发者

How can I determine the "deleted on" date of an item in Exchange using EWS?

I've written a C# program using managed Exchange Web Services (EWS) to query a user mailbox in Exchange 2010.

We need to be able to look at the recoverable items for various users and see for each user how many items we开发者_运维知识库re deleted within a specific time range. I have been able to query the WellKnownFolderName.RecoverableItemsDeletions folder and fetch the items, but I can not find any property that tells when the items were deleted. (The Outlook GUI shows this date, so I know the property must be stored somewhere.)

There are no standard properties that look like "DateDeleted" or anything close. I have tried to see if the extended MAPI property PR_DELETED_ON is defined for the items, but either it is not or I'm not querying it correctly.

How can I find out when these items were deleted?

-mark


As you stated, supposedly an extended MAPI property named PR_DELETED_ON is set when an item gets deleted permanently from the Deleted Items folder, however, I've never run into this property myself either.

Instead, look at the value for the deleted item's PR_LAST_MODIFICATION_TIME property (0x30080040). This property stores a PT_SYSTIME value reflecting the date and time the item was last modified. This property is updated when an item is deleted, so you should be able to use it as an indicator as to when the item was deleted.

You stated you were using the RecoverableItemsDeletions enumeration value. This points to the Deletions subfolder underneath the inbox's Recoverable Items folder. This is where items go that are deleted from the Deleted Items folder. So, be aware that the value for the PR_LAST_MODIFICATION_TIME property of any item found in that folder will reflect the date and time that the item was deleted from the Deleted Items folder (unless the user soft-deleted it).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜