EwsDownloadItems Method (FolderId, ItemView, Boolean, PropertySet) |
Namespace: MailBee.EwsMail
public EwsItemList DownloadItems( FolderId id, ItemView view, bool unreadOnly, PropertySet properties )
Exception | Condition |
---|---|
MailBeeException | An error occurred and ThrowExceptions is true. |
NotImplementedException | The .NET runtime is .NET Core. |
To specify the folder by its name, first get its ID with FindFolderIdByShortName(FolderId, String) or FindFolderIdByFullName(String) method.
This overload lets you specify EWS's ItemView object to configure ordering and paging of the results. Alternatively, you can download all IDs of all items using DownloadItemIds(FolderId, Boolean) method and then use DownloadItems(IEnumerable<EwsItem>, EwsItemParts) overload to download the requested items.
You can also use DownloadItems(FolderId, int, int, bool, PropertySet) overload if you have a range of messages you want to download.
As for properties parameter, You can build PropertySet object manually or use CreatePropSet(EwsItemParts) method for this.
Note |
---|
view parameter (ItemView object) has its own PropertySet setting. It's not used by this method so it's recommended to leave the default value. If you need this value to be actually consumed, consider Search(FolderId, SearchFilter, ItemView) method instead. |
Note |
---|
This method is not implemented in .NET Core. Use DownloadItemsAsync(FolderId, ItemView, Boolean, PropertySet) instead. |