EwsDownloadItems Method (FolderId, Int32, Int32, Boolean, PropertySet)
Downloads items in the specified folder in the specified range using PropertySet settings.

Namespace: MailBee.EwsMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public EwsItemList DownloadItems(
	FolderId id,
	int startIndex,
	int count,
	bool unreadOnly,
	PropertySet properties
)

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.
properties
Type: PropertySet
The settings which specify which portions of MS Exchange items to download (e.g. item ID, mail header, body, etc). If a null reference, only item ID is requested.

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.

This is advanced overload which lets you request item parts in the native way of Exchange EWS (via PropertySet obejct). If you just want to dowload full messages with attachments, use DownloadItems(FolderId, Int32, Int32, Boolean, EwsItemParts) overload and pass 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, PropertySet) instead.
See Also