EwsDownloadEntireMessage Method
Downloads the specified item by its ID and returns it as MailMessage object.

Namespace: MailBee.EwsMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.3.0 build 647 for .NET 4.5
public MailMessage DownloadEntireMessage(
	ItemId id


Type: ItemId
The ID of the item. Null reference (Nothing in Visual Basic) not allowed.

Return Value

Type: MailMessage
The downloaded e-mail, or a null reference (Nothing in Visual Basic) on error.
MailBeeExceptionAn error occurred and ThrowExceptions is true.
NotImplementedExceptionThe .NET runtime is .NET Core.

To get item IDs, you can use DownloadItemIds(FolderId, Boolean) or Search(FolderId, SearchFilter) methods and then pass Id of items of the returned list to the current method. If you have a string ID (UniqueId), you can create ItemId using #ctor(String) constructor.

This method downloads the entire message with attachments as MailBee's MailMessage object. MS Exchange also lets you download attachments separately (if you know their string IDs) using EWS Managed API, see DownloadNativeAttachments(String, Boolean) method for details.

To download multiple entire messages or learn message flags like unread status, you can use a method like DownloadItems(FolderId, Int32, Int32, Boolean, EwsItemParts) passing MailMessageFull as parts parameter value. The mail messages can then be accessed with MailBeeMessage property for each EwsItem in the returned list.

Note Note
This method is not implemented in .NET Core. Use DownloadEntireMessageAsync(ItemId) instead.
See Also