ExchangeService.MarkAsJunk Method

Definition

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.

public:
 Microsoft::Exchange::WebServices::Data::ServiceResponseCollection<Microsoft::Exchange::WebServices::Data::MarkAsJunkResponse ^> ^ MarkAsJunk(System::Collections::Generic::IEnumerable<Microsoft::Exchange::WebServices::Data::ItemId ^> ^ itemIds, bool isJunk, bool moveItem);
public Microsoft.Exchange.WebServices.Data.ServiceResponseCollection<Microsoft.Exchange.WebServices.Data.MarkAsJunkResponse> MarkAsJunk (System.Collections.Generic.IEnumerable<Microsoft.Exchange.WebServices.Data.ItemId> itemIds, bool isJunk, bool moveItem);
Public Function MarkAsJunk (itemIds As IEnumerable(Of ItemId), isJunk As Boolean, moveItem As Boolean) As ServiceResponseCollection(Of MarkAsJunkResponse)

Parameters

itemIds
IEnumerable<ItemId>

IDs for the mailbox items to mark.

isJunk
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).

moveItem
Boolean

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

Returns

A collection of item IDs for each of the moved items.

Applies to