EwsDeleteAttachment Method |
Namespace: MailBee.EwsMail
public int DeleteAttachment( ItemId id, string filenameOrAttachId, bool isAttachId, bool deleteFirstOccurenceOnly )
Exception | Condition |
---|---|
MailBeeException | An error occurred and ThrowExceptions is true. |
NotImplementedException | The .NET runtime is .NET Core. |
The attachment will be deleted permanently.
There can be multiple attachements with the same filename. With this method you can delete them all or only the first one.
Note |
---|
The method does not cause an exception in case if no attachment with the given filename or attachment ID is found (you'll simly get zero as the return value). Providing incorrect item ID, however, is considered error. |
If you need more sophisticated processing of an item, you can use NativeItem property to access its members and then call UpdateItem(EwsItem) to save the changes to the MS Exchange server.
Note |
---|
This method is not implemented in .NET Core. Use DeleteAttachmentAsync(ItemId, String, Boolean, Boolean) instead. |