MapiAttachment
Overview
MapiAttachment is a class in Aspose.Email for NET.
MapiAttachment.FromBytes creates an attachment from a filename, byte array, optional MIME type and content ID.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Filename | string? | Read/Write | Gets or sets the attachment’s file name |
Data | byte[] | Read/Write | Gets or sets the raw byte content of the attachment |
MimeType | string? | Read/Write | Gets or sets the attachment’s MIME type, if any |
ContentId | string? | Read/Write | Gets or sets the attachment’s content identifier, if any |
EmbeddedMessage | MapiMessage? | Read/Write | Gets or sets the embedded MapiMessage, when the attachment is a message |
Properties | MapiPropertyCollection | Read | Provides access to the attachment’s MAPI property collection |
IsEmbeddedMessage | bool | Read | Indicates whether the attachment contains an embedded message |
IsStorageAttachment | bool | Read | Indicates whether the attachment is a storage (OLE) attachment |
Methods
| Signature | Description |
|---|---|
FromBytes(filename: string, data: byte[], mimeType: string?, contentId: string?) | Creates an attachment from a filename, byte array, optional MIME type and content ID |
FromStream(filename: string, stream: Stream, mimeType: string?, contentId: string?) | |
LoadData(stream: Stream) | Reads attachment data from the provided stream into the attachment |
OpenRead() | Returns a read-only stream for the attachment’s data |