ExchangeService.MarkAsJunk method

Marks mailbox items as junk.

The MarkAsJunk(IEnumerable<ItemId>, Boolean, Boolean) method is applicable for clients that target Exchange Online and versions of Exchange starting with Exchange Server 2013.

Namespace:  Microsoft.Exchange.WebServices.Data
Assembly:  Microsoft.Exchange.WebServices (in Microsoft.Exchange.WebServices.dll)

public ServiceResponseCollection<MarkAsJunkResponse> MarkAsJunk(
	IEnumerable<ItemId> itemIds,
	bool isJunk,
	bool moveItem


Type: System.Collections.Generic.IEnumerable<ItemId>

IDs for the mailbox items to mark.

Type: System.Boolean

true if the items are junk (in which case, senders are added to the blocked senders list); otherwise, false (in which case, senders are not added to the blocked senders list).

Type: System.Boolean

true to move the item to the junk folder; otherwise, false.

Return value

Type: Microsoft.Exchange.WebServices.Data.ServiceResponseCollection<MarkAsJunkResponse>
A collection of item IDs for each of the moved items.