Create(subject: string, body: string, unicodeStrings: bool) | Creates a new MapiMessage with the given subject and body, optionally using Unicode strings. |
FromFile(path: string, strict: bool) | Loads a MapiMessage from a .msg file at path; strict enables full structural validation. |
FromStream(stream: Stream, strict: bool) | Loads a MapiMessage from stream; strict enables full structural validation. |
FromMsgDocument(document: MsgDocument) | Wraps an already-parsed MsgDocument in a MapiMessage. |
LoadFromEml(path: string) | Converts an EML file at path to a MapiMessage via in-memory MIME parsing. |
LoadFromEml(stream: Stream) | Converts an EML file at path to a MapiMessage via in-memory MIME parsing. |
LoadFromEml(data: byte[]) | Converts an EML file at path to a MapiMessage via in-memory MIME parsing. |
Dispose() | Releases unmanaged resources held by this message. |
AddRecipient(emailAddress: string, displayName: string?, recipientType: int) | Adds a recipient with the given email address, display name, and type (1 = To, 2 = Cc, 3 = Bcc). |
AddAttachment(filename: string, data: byte[], mimeType: string?, contentId: string?) | Attaches a file by name and binary data, optionally specifying MIME type and Content-ID. |
AddAttachment(filename: string, stream: Stream, mimeType: string?, contentId: string?) | Attaches a file by name and binary data, optionally specifying MIME type and Content-ID. |
AddEmbeddedMessageAttachment(message: MapiMessage, filename: string?, mimeType: string?) | Attaches another MapiMessage as an embedded-message attachment. |
SetProperty(propertyId: ushort, propertyType: ushort, value: object?, flags: uint) | Sets a raw MAPI property by property ID, type, value, and flags. |
GetPropertyValue(propertyId: ushort, propertyType: ushort?, decode: bool) | Retrieves the value of a MAPI property by ID and optional type; decode controls string decoding. |
IterPropertyKeys() | Enumerates the (propertyId, propertyType) key pairs of all stored properties. |
IterProperties() | Enumerates all MapiProperty objects stored in this message. |
IterAttachmentsInfo() | Enumerates attachment metadata without loading full attachment data. |
ToMsgDocument() | Converts this MapiMessage to a MsgDocument suitable for CFB serialization. |
Save() | Saves the message in-place (for messages originally loaded from a file or stream). |
Save(path: string) | Saves the message in-place (for messages originally loaded from a file or stream). |
Save(stream: Stream) | Saves the message in-place (for messages originally loaded from a file or stream). |
SaveToEml() | Saves the message in-place (for messages originally loaded from a file or stream). |
SaveToEml(path: string) | Saves the message in-place (for messages originally loaded from a file or stream). |
SaveToEml(stream: Stream) | Saves the message in-place (for messages originally loaded from a file or stream). |