EwsDownloadNativeAttachments Method |
Namespace: MailBee.EwsMail
public List<Attachment> DownloadNativeAttachments( string[] attachmentIds, bool ignoreInlineAttachments )
Exception | Condition |
---|---|
MailBeeException | An error occurred and ThrowExceptions is true. |
NotImplementedException | The .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 |
---|
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. |
Note |
---|
This method is not implemented in .NET Core. Use DownloadNativeAttachmentsAsync(String, Boolean) instead. |