EwsDownloadItem Method (FolderId, Int32, EwsItemParts) |
Downloads the specified portions of an Exchange item in the specified folder at the specified index.
Namespace: MailBee.EwsMailAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public EwsItem DownloadItem(
FolderId id,
int index,
EwsItemParts parts
)
Public Function DownloadItem (
id As FolderId,
index As Integer,
parts As EwsItemParts
) As EwsItem
Parameters
- id
- Type: FolderId
The ID of the folder. Null reference (Nothing in Visual Basic) not allowed. - index
- Type: SystemInt32
The zero-based index of the message to be downloaded. - parts
- Type: MailBee.EwsMailEwsItemParts
The settings which specify which portions of an MS Exchange item to download (e.g. item ID, mail header, body, etc). You can combine multiple values.
Return Value
Type:
EwsItemThe item 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.
With this overload you can download an entire message by passing MailMessageFull as parts parameter value.
Note |
---|
In EWS, message indices start from 0 while in IMAP and POP3 they start from 1. Also, the default sorting order in Exchange is "newer first". In IMAP/POP3, "older first" is the default. |
See Also