MapiMessage.DestroyAttachments
MapiMessage.DestroyAttachments method
Removes all attachments from an MSG file and overwrites the file. The attachments are not read, which is faster than RemoveAttachments.
public static void DestroyAttachments(string path)
| Parameter | Type | Description |
|---|---|---|
| path | String | The path of the MSG file. |
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | path is null. |
| ArgumentException | path is empty. |
Examples
This example removes the attachments of an MSG file without reading them.
[C#]
MapiMessage.DestroyAttachments(@"c:\messages\message.msg");
[Visual Basic]
MapiMessage.DestroyAttachments("c:\messages\message.msg")
See Also
- class MapiMessage
- namespace Aspose.Email.Mapi
- assembly Aspose.Email