Instead of FindItems()
, use the ExchangeService.BindToItems()
method and provide a collection of the message ids you want in batches. Restrict the property set to only the properties you need. A couple of other thoughts:
- Limit the preview response shape to just the item identifiers since you'll call BindToItems
for the properties you need.
- FindItems will only return the first 512 characters of the body.
- Use paging with SearchMailboxes()
. Optimal page size will depend on the property set. You'd have to test different page sizes to optimize.
Exchange Web Services EWS, search mails in in-place eDiscovery & hold
-
14-06-2023 - |
문제
I want to download mails that matches the in-place eDiscovery. I do a GetDiscoverySearchConfiguration()
, then I execute SearchMailboxes()
for each mailbox that GetDiscoverySearchConfiguration()
returns. SearchMailboxes()
returns SearchPreviewItems()
where I can get the real EmailMessage
Id but this does not have the email body, so I have to do another retrieve using FindItems()
to get the EmailMessage
object.
This is a very slow process, are there any other way to do this?
I would like to get all the mails that I can see in the preview
해결책
제휴하지 않습니다 StackOverflow