EwsDeleteItems Method
Deletes the specified item (e.g. mail message).

Namespace: MailBee.EwsMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.2.0 build 630 for .NET 4.5
public List<ItemId> DeleteItems(
	IEnumerable<ItemId> ids


Type: System.Collections.GenericIEnumerableItemId
The IDs of the items to delete. Null reference (Nothing in Visual Basic) not allowed.

Return Value

Type: ListItemId
The list of IDs which have been deleted if succeeded; otherwise, a null reference.
MailBeeExceptionAn error occurred and ThrowExceptions is true.
NotImplementedExceptionThe .NET runtime is .NET Core.

The item is deleted using DeleteMethod mode.

If you have a collection of EwsItem objects, you can convert it into the collection of ItemId elements using EwsItemsToItemIds(IEnumerableEwsItem) method which you can then pass to the current method.

Note Note
This method can still complete successfully if at least one item has been deleted. To make sure all the requested items have been deleted, check that the length of the resulting list is the same as the count of elements in the input. ItemId values of the items which could not be deleted will not be present in the resuling list.
See Also