MapiAttachment

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

NameTypeAccessDescription
Filenamestring?Read/WriteGets or sets the attachment’s file name
Databyte[]Read/WriteGets or sets the raw byte content of the attachment
MimeTypestring?Read/WriteGets or sets the attachment’s MIME type, if any
ContentIdstring?Read/WriteGets or sets the attachment’s content identifier, if any
EmbeddedMessageMapiMessage?Read/WriteGets or sets the embedded MapiMessage, when the attachment is a message
PropertiesMapiPropertyCollectionReadProvides access to the attachment’s MAPI property collection
IsEmbeddedMessageboolReadIndicates whether the attachment contains an embedded message
IsStorageAttachmentboolReadIndicates whether the attachment is a storage (OLE) attachment

Methods

SignatureDescription
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