mapi_message
Overview
mapi_message is a class in Aspose.Email FOSS for C++.
Description
mapi_message is a class in the Aspose.Email FOSS library for C++ that exposes 40 methods and 6 properties for programmatic use.
Core capabilities include: std::uint32_t; sets the message subject; sets the plain‑text body of the message. These operations enable developers to integrate mapi_message functionality directly into C++ applications.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
default_property_flags | std::uint32_t | Read/Write | Represents the default property flag bitmask |
recipient_type_to | int | Read/Write | Represents the ‘To’ recipient type constant |
recipient_type_cc | int | Read/Write | Represents the ‘CC’ recipient type constant |
recipient_type_bcc | int | Read/Write | Represents the ‘BCC’ recipient type constant |
attach_method_by_value | int | Read/Write | Represents attachment by value method constant |
attach_method_embedded | int | Read/Write | Represents embedded attachment method constant |
Methods
| Signature | Description |
|---|---|
create(subject: std::string, body: std::string, unicode_strings: bool) → mapi_message | |
from_file(path: std::filesystem::path, strict: bool) → mapi_message | Loads a MSG file from the given path, optionally enforcing strict parsing |
from_stream(stream: std::istream, strict: bool) → mapi_message | Loads a MSG from an input stream, optionally enforcing strict parsing |
from_msg_document(document: msg_document) → mapi_message | Creates a message from an existing msg_document instance |
load_from_eml(path: std::filesystem::path) → mapi_message | Loads an EML file from a path or stream into a mapi_message |
load_from_eml(stream: std::istream) → mapi_message | |
unicode_strings() → bool | |
set_unicode_strings(value: bool) | |
set_subject(value: std::string) | Sets the message subject |
set_body(value: std::string) | Sets the plain‑text body of the message |
set_html_body(value: std::string) | |
set_message_class(value: std::string) | |
set_sender_name(value: std::string) | Sets the display name of the sender |
set_sender_email_address(value: std::string) | Sets the sender’s email address |
set_sender_address_type(value: std::string) | |
set_internet_message_id(value: std::string) | Sets the Internet Message‑ID header value |
to_msg_document() → msg_document | Converts the message to a msg_document object |
save() → std::vector<std::uint8_t> | Returns the message as a byte vector in MSG format |
save(path: std::filesystem::path) | |
save(stream: std::ostream) | |
save_to_eml() → std::vector<std::uint8_t> | Saves the EML to the provided output stream |
save_to_eml(path: std::filesystem::path) | |
save_to_eml(stream: std::ostream) |