mapi_message

Overview

mapi_message is a class in Aspose.Email for CPP. Inherits from: mapi_message.

Properties

NameTypeAccessDescription
default_property_flagsstd::uint32_tRead/WriteRepresents the default flags applied to message properties
recipient_type_tointRead/Write
recipient_type_ccintRead/Write
recipient_type_bccintRead/Write
attach_method_by_valueintRead/WriteRepresents the attachment method where data is stored by value
attach_method_embeddedintRead/WriteRepresents the attachment method for embedded message attachments

Methods

SignatureDescription
create(subject: std::string, body: std::string, unicode_strings: bool)mapi_message
from_file(path: std::filesystem::path, strict: bool)mapi_messageLoads a MSG file from the given path, optionally enforcing strict parsing
from_stream(stream: std::istream, strict: bool)mapi_messageLoads a MSG from an input stream, optionally enforcing strict parsing
from_msg_document(document: msg_document)mapi_messageCreates a mapi_message from an existing msg_document
load_from_eml(path: std::filesystem::path)mapi_messageLoads an EML file from the specified path 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’s subject string
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_documentConverts the mapi_message to a low‑level msg_document
save()std::vector<std::uint8_t>Returns the MSG representation as a byte vector
save(path: std::filesystem::path)
save(stream: std::ostream)
save_to_eml()std::vector<std::uint8_t>Returns the EML representation as a byte vector
save_to_eml(path: std::filesystem::path)
save_to_eml(stream: std::ostream)