mapi_message
概述
mapi_message 是 Aspose.Email FOSS 中用于 C++ 的一个类。
描述
mapi_message 是 Aspose.Email FOSS 库中用于 C++ 的一个类,提供 44 个方法和 6 个属性供程序化使用。
核心功能包括:std::uint32_t;设置消息主题;设置消息的纯文本正文。这些操作使开发者能够将 mapi_message 功能直接集成到 C++ 应用程序中。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
default_property_flags | std::uint32_t | 读写 | 表示默认属性标志位掩码 |
recipient_type_to | int | 读写 | 表示 'To' 收件人类型常量 |
recipient_type_cc | int | 读写 | 表示 ‘CC’ 收件人类型常量 |
recipient_type_bcc | int | 读写 | 表示 “BCC” 收件人类型常量 |
attach_method_by_value | int | 读写 | 表示附件按值方法常量 |
attach_method_embedded | int | 读写 | 表示嵌入式附件方法常量 |
方法
| 签名 | 描述 |
|---|---|
create(subject: std::string, body: std::string, unicode_strings: bool) → mapi_message | |
from_file(path: std::filesystem::path, strict: bool) → mapi_message | 从给定路径加载 MSG 文件,可选择强制严格解析 |
from_stream(stream: std::istream, strict: bool) → mapi_message | 从输入流加载 MSG,可选地强制严格解析 |
from_msg_document(document: msg_document) → mapi_message | 从现有的 msg_document 实例创建消息 |
load_from_eml(path: std::filesystem::path) → mapi_message | 将 EML 文件从路径或流加载到 mapi_message |
load_from_eml(stream: std::istream) → mapi_message | |
unicode_strings() → bool | |
set_unicode_strings(value: bool) | |
set_subject(value: std::string) | 设置邮件主题 |
set_body(value: std::string) | 设置消息的纯文本正文 |
set_html_body(value: std::string) | |
set_message_class(value: std::string) | |
set_sender_name(value: std::string) | 设置发件人的显示名称 |
set_sender_email_address(value: std::string) | 设置发件人的电子邮件地址 |
set_sender_address_type(value: std::string) | |
set_internet_message_id(value: std::string) | 设置 Internet Message‑ID 标头的值 |
to_msg_document() → msg_document | 将消息转换为 msg_document 对象 |
save() → std::vector<std::uint8_t> | 以 MSG 格式返回消息的字节向量 |
save(path: std::filesystem::path) | |
save(stream: std::ostream) | |
save_to_eml() → std::vector<std::uint8_t> | 将 EML 保存到提供的输出流 |
save_to_eml(path: std::filesystem::path) | |
save_to_eml(stream: std::ostream) |