IAsyncEwsClient.MarkAsJunkAsync

IAsyncEwsClient.MarkAsJunkAsync method

The MarkAsJunk method moves mail messages to the junk mail folder and blocks message sender.

public Task<IEnumerable<string>> MarkAsJunkAsync(IEnumerable<string> messageUris, 
    bool isJunk = true, bool moveItem = false, CancellationToken cancellationToken = default)
ParameterTypeDescription
messageUrisIEnumerable`1Enumeration of message uri
isJunkBooleanIndicates, whether messages are marked as junk mail. If value of true adds message sender to the block-list. If value of false removes message sender from the block-list.
moveItemBooleanIndicates, whether messages is moved to the junk mail folder.
cancellationTokenCancellationTokenThe cancellation token.

Return Value

The set of identifiers of moved items

Exceptions

exceptioncondition
EwsMarkAsJunkExceptionThere where failed items.

See Also