EwsDownloadItems Method (FolderId, Int32, Int32, Boolean) |
Downloads items in the specified folder in the specified range.
Namespace: MailBee.EwsMailAssembly: 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
)
Public Function DownloadItems (
id As FolderId,
startIndex As Integer,
count As Integer,
unreadOnly As Boolean
) As EwsItemList
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.
Return Value
Type:
EwsItemListThe list of items in the given folder, or a null reference (
Nothing in Visual Basic) on error.
Exceptions Remarks To specify the folder by its name, first get its ID with FindFolderIdByShortName(FolderId, String) or FindFolderIdByFullName(String) method.
Note |
---|
This overload downloads only basic properties of Exchange items. You need to use other overloads (such as those accepting the parameter of EwsItemParts type) to get full e-mail messages. |
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. |
See Also