EwsDownloadNativeAttachments Method
Downloads attachments with the specified string IDs.

Namespace: MailBee.EwsMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.2.0 build 630 for .NET 4.5
public List<Attachment> DownloadNativeAttachments(
	string[] attachmentIds,
	bool ignoreInlineAttachments


Type: SystemString
The array of attachment IDs. Null reference (Nothing in Visual Basic) or empty array not allowed.
Type: SystemBoolean
If true, only "real" attachments will be returned. If false, attachments of all types will be returned (including embedded pics, etc).

Return Value

Type: ListAttachment
The list of MS Exchange attachments, or a null reference (Nothing in Visual Basic) on error.
MailBeeExceptionAn error occurred and ThrowExceptions is true.
NotImplementedExceptionThe .NET runtime is .NET Core.

This is the advanced method which deals directly with EWS Managed API objects and types.

To get the list of attachment IDs (which you can supply to this method), you'll need to use a method like DownloadItem(ItemId, EwsItemParts) with MailMessageAttachments flag set and then examine Attachments collection of NativeMessage object.

Attachment type does not expose all the available EWS Managed API attachment properties. You'll need to cast it to FileAttachment or ItemAttachment types to get the rest of them.

Note Note
To simply get e-mail message with all attachments, use DownloadEntireMessage(ItemId) method. It will return the message with attachments collection in the same way Imap and Pop3 components do. DownloadNativeAttachments(String, Boolean) method, however, returns attachment objects using native MS Exchange types, not MailBee types. This can be useful for advanced purposes if you need to extract MS Exchange specific data from them.
See Also