MapiMessage
Overview
MapiMessage là một lớp trong Aspose.Email FOSS cho Python.
Khả năng chuyển đổi đối tượng MSG cấp cao với hỗ trợ chuyển biến MS G và EmailMessage.
Khóa học này cung cấp 22 phương pháp để làm việc với các đối tượng MapiMessage trong các chương trình Python. Các phương pháp có sẵn bao gồm: add_attachment, add_embedded_message_attachment, add_recipient, close, create, from_email_message, from_file, from_msg_document, get_named_property, get_property, get_property_value, iter_attachments_info,Và 10 phương pháp bổ sung. Tất cả các thành viên công cộng đều có thể truy cập bất kỳ ứng dụng Python nào sau khi cài đặt Aspose.Email FOSS cho gói Python. Tài sản : attachments, body, body_html, declared_attachment_count, declared_next_attachment_id, declared_next_recipient_id,19 và thêm.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
msg_reader | MsgReader | Read | Đọc thêm về msg reader. |
validation_issues | tuple[str, ...] | Read | Nhận được các vấn đề xác nhận. |
subject | `str | None` | Đọc / viết |
body | `str | None` | Đọc / viết |
message_class | `str | None` | Đọc / viết |
body_html | `str | None` | Đọc / viết |
unicode_strings | bool | Đọc / viết | Nhận hoặc đặt các dây unicode. |
properties | MapiPropertyCollection | Đọc / viết | Nhận hoặc đặt tài sản. |
recipients | list[MapiRecipient] | Đọc / viết | Nhận hoặc đặt người nhận. |
attachments | list[MapiAttachment] | Đọc / viết | Nhận hoặc đặt các phụ kiện. |
extra_streams | list[MsgStream] | Đọc / viết | Nhận hoặc đặt các dòng chảy bổ sung. |
extra_storages | list[MsgStorage] | Đọc / viết | Nhận hoặc đặt các lưu trữ bổ sung. |
nameid_mapping | _NamedPropertyMapping | Đọc / viết | Nhận hoặc đặt bản mapping namid. |
major_version | int | Đọc / viết | Nhận hoặc đặt phiên bản chính. |
minor_version | int | Đọc / viết | Nhận hoặc đặt phiên bản nhỏ hơn. |
transaction_signature_number | int | Đọc / viết | Nhận hoặc đặt số chữ ký giao dịch. |
header_reserved_0 | bytes | Đọc / viết | Nhận hoặc đặt tiêu đề được bảo lưu 0. |
header_reserved_1 | bytes | Đọc / viết | Nhận hoặc đặt tiêu đề được bảo lưu 1. |
emit_store_support_mask | bool | Đọc / viết | Nhận hoặc đặt mặt nạ hỗ trợ cửa hàng phát hành. |
emit_compatibility_defaults | bool | Đọc / viết | Nhận hoặc đặt các lỗi tương thích phát hành. |
preserve_declared_header_counts | bool | Đọc / viết | Nhận hoặc đặt số tiêu đề được tuyên bố bảo tồn. |
declared_next_recipient_id | `int | None` | Đọc / viết |
declared_next_attachment_id | `int | None` | Đọc / viết |
declared_recipient_count | `int | None` | Đọc / viết |
declared_attachment_count | `int | None` | Đọc / viết |
Methods
| Signature | Description |
|---|---|
| `from_file(path: Path | str, strict: bool)→“MapiMessage”` |
from_msg_document(document: MsgDocument) → "MapiMessage" | Gọi từ_msg_document trên trường hợp này MapiMessage. |
from_email_message(email_message: EmailMessage, unicode_strings: bool) → "MapiMessage" | Gọi từ_email_message trên trường hợp này MapiMessage. |
create(subject: str, body: str, unicode_strings: bool) → "MapiMessage" | Các cuộc gọi được tạo trên trường hợp MapiMessage này. |
iter_properties() → Iterator[MapiProperty] | Nhấn iter_properties trên trường hợp MapiMessage này. |
iter_property_keys(storage_stream_id: int) → Iterator[tuple[int, int]] | Nhấn iter_property_keys trên trường hợp MapiMessage này. |
| `set_property(property_id: int | CommonMessagePropertyId |
| `get_property(property_id: int | CommonMessagePropertyId |
| `get_property_value(property_id: int | CommonMessagePropertyId |
| `set_named_property(named_property: MapiNamedProperty, property_type: int | PropertyTypeCode, value: Any, flags: int)→MapiProperty` |
| `get_named_property(named_property: MapiNamedProperty, property_type: int | None)→MapiProperty |
| `add_recipient(email_address: str, display_name: str | None, recipient_type: int)→MapiRecipient` |
| `add_attachment(filename: str, data: bytes, mime_type: str | None, content_id: str |
| `add_embedded_message_attachment(message: “MapiMessage”, filename: str | None, mime_type: str |
| `save(path: Path | str)` |
to_bytes() → bytes | Call to_bytes trên trường hợp MapiMessage này. |
to_email_message() → EmailMessage | Gọi_email_message trên trường hợp này MapiMessage. |
to_email_bytes() → bytes | Gọi_email_bytes trên trường hợp này. |
to_email_string() → str | Gọi_email_string trên trường hợp này. |
iter_attachments_info() → Iterator[MapiAttachment] | Nhờ iter_attachments_info vào trường hợp này. |
close() | Gọi gần vào trường hợp MapiMessage này. |
to_msg_document() → MsgDocument | Gọi_msg_document trên ví dụ này MapiMessage. |