Pavlo Hryza
Pavlo Hryza

Reputation: 677

Moving batch of EmailMessages using EWS Managed API

Is it possible to move list of EmailMessage through one request to Exchange Web Service? The only way how to move one message is EmailMessage.Move method:

Item item = beforeMessage.Move(WellKnownFolderName.JunkEmail)

Is there any possibility for a batch of items?

Upvotes: 0

Views: 703

Answers (1)

Glen Scales
Glen Scales

Reputation: 22032

Use the MoveItems method eg ExchangeService.MoveItems https://msdn.microsoft.com/en-us/library/office/microsoft.exchange.webservices.data.exchangeservice.moveitems(v=exchg.80).aspx which will batch the request. I would be careful around optimising your batch sizes to avoid throttling issues.

Upvotes: 1

Related Questions