MapiAttachment

MapiAttachment

Overview

MapiAttachment is a class in Aspose.Email FOSS for .NET.

MapiAttachment.FromBytes creates an attachment from a filename, byte array, optional MIME type and content ID.

Description

MapiAttachment is a class in the Aspose.Email FOSS library for .NET that exposes 4 methods and 8 properties for programmatic use.

The class also provides the Properties property (provides the collection of mapi properties associated with the attachment), the IsEmbeddedMessage property (indicates whether the attachment contains an embedded message), the IsStorageAttachment property (indicates whether the attachment is a storage (ole) attachment).

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 MIME type of the attachment
ContentIdstring?Read/WriteGets or sets the content identifier for inline attachments
EmbeddedMessageMapiMessage?Read/WriteGets or sets an embedded MapiMessage if the attachment is a message
PropertiesMapiPropertyCollectionReadProvides the collection of MAPI properties associated with the attachment
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)Loads attachment binary data from the given stream into the attachment
OpenRead()Returns a readable stream for the attachment’s data

See Also