MarkAsJunk method

Future<ServiceResponseCollection<MarkAsJunkResponse>> MarkAsJunk(
  1. Iterable<ItemId> itemIds,
  2. bool isJunk,
  3. bool moveItem
)
Mark items as junk. ItemIds for the items to mark Whether the items are junk. If true, senders are add to blocked sender list. If false, senders are removed. Whether to move the item. Items are moved to junk folder if isJunk is true, inbox if isJunk is false.

Implementation

Future<ServiceResponseCollection<MarkAsJunkResponse>> MarkAsJunk(
  Iterable<ItemId> itemIds,
  bool isJunk,
  bool moveItem,
) {
  MarkAsJunkRequest request = MarkAsJunkRequest(
    this,
    ServiceErrorHandling.ReturnErrors,
  );
  request.ItemIds.AddRangeItemIds(itemIds);
  request.IsJunk = isJunk;
  request.MoveItem = moveItem;
  return request.Execute();
}