EwsDownloadItems Method (FolderId, Int32, Int32, Boolean, EwsItemParts)
Downloads the specified portions of Exchange items in the specified folder in the specified range.

Namespace: MailBee.EwsMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public EwsItemList DownloadItems(
	FolderId id,
	int startIndex,
	int count,
	bool unreadOnly,
	EwsItemParts parts
)

Parameters

id
Type: FolderId
The ID of the folder. Null reference (Nothing in Visual Basic) not allowed.
startIndex
Type: SystemInt32
The zero-based index of the first message in the range to be downloaded.
count
Type: SystemInt32
Number of items to be downloaded.
unreadOnly
Type: SystemBoolean
If true, only unread items are considered for download; otherwise, all the items.
parts
Type: MailBee.EwsMailEwsItemParts
The settings which specify which portions of MS Exchange items to download (e.g. item ID, mail header, body, etc). You can combine multiple values.

Return Value

Type: EwsItemList
The list of items in the given folder, or a null reference (Nothing in Visual Basic) on error.
Exceptions
ExceptionCondition
MailBeeExceptionAn error occurred and ThrowExceptions is true.
NotImplementedExceptionThe .NET runtime is .NET Core.
Remarks

To specify the folder by its name, first get its ID with FindFolderIdByShortName(FolderId, String) or FindFolderIdByFullName(String) method.

With this overload you can download entire messages by passing MailMessageFull as parts parameter value.

Note Note
In EWS, message indices start from 0 while in IMAP and POP3 they start from 1. Also, items are returned in the default sorting order which usually means "newer first" in Exchange. In IMAP/POP3, "older first" is the default. To change sorting order, use overloads accepting the parameter of ItemView type.
Note Note
This method is not implemented in .NET Core. Use DownloadItemsAsync(FolderId, Int32, Int32, Boolean, EwsItemParts) instead.
See Also