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

NameTypeAccessDescription
default_property_flagsstd::uint32_tRead/WriteRepresents the default property flag bitmask
recipient_type_tointRead/WriteRepresents the ‘To’ recipient type constant
recipient_type_ccintRead/WriteRepresents the ‘CC’ recipient type constant
recipient_type_bccintRead/WriteRepresents the ‘BCC’ recipient type constant
attach_method_by_valueintRead/WriteRepresents attachment by value method constant
attach_method_embeddedintRead/WriteRepresents embedded attachment method constant

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 message from an existing msg_document instance
load_from_eml(path: std::filesystem::path)mapi_messageLoads 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_documentConverts 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)

See Also