Expand Minimize

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)

'Declaration
Public Function MarkAsJunk ( _
	itemIds As IEnumerable(Of ItemId), _
	isJunk As Boolean, _
	moveItem As Boolean _
) As ServiceResponseCollection(Of MarkAsJunkResponse)
'Usage
Dim instance As ExchangeService
Dim itemIds As IEnumerable(Of ItemId)
Dim isJunk As Boolean
Dim moveItem As Boolean
Dim returnValue As ServiceResponseCollection(Of MarkAsJunkResponse)

returnValue = instance.MarkAsJunk(itemIds, _
	isJunk, moveItem)

Parameters

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

IDs for the mailbox items to mark.

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

moveItem
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.
Show:
© 2015 Microsoft