MapiMessage
Overview
MapiMessage เป็นคลาสใน Aspose.Email FOSS สําหรับ Python.
อัตถุ MSG ระดับสูงที่สามารถเปลี่ยนแปลงได้ พร้อมกับการสนับสนุนการแปลง MS G และ EmailMessage.
หมวดนี้ให้ 22 วิธีในการทํางานกับวัตถุ MapiMessage ในโปรแกรม Python. วิธีการที่ใช้ได้แก่: 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,และ 10 วิธีเพิ่มเติม. สมาชิกสาธารณะทุกคนสามารถเข้าถึงการใช้งาน Python ใดก็ได้หลังจากติดตั้งแพ็คเกจ FOSS for Python. คุณสมบัติ: attachments, body, body_html, declared_attachment_count, declared_next_attachment_id, declared_next_recipient_id,และอีก 19 คน.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
msg_reader | MsgReader | Read | ได้รับเครื่องอ่านข้อความ. |
validation_issues | tuple[str, ...] | Read | ได้รับปัญหาการยืนยันความเป็นจริง. |
subject | `str | None` | อ่าน/เขียน |
body | `str | None` | อ่าน/เขียน |
message_class | `str | None` | อ่าน/เขียน |
body_html | `str | None` | อ่าน/เขียน |
unicode_strings | bool | อ่าน/เขียน | ได้หรือกําหนดสตริงยูนิโค้ด. |
properties | MapiPropertyCollection | อ่าน/เขียน | ได้รับหรือกําหนดคุณสมบัติ. |
recipients | list[MapiRecipient] | อ่าน/เขียน | ได้รับหรือกําหนดผู้ได้รับ. |
attachments | list[MapiAttachment] | อ่าน/เขียน | ได้รับหรือตั้งเครื่องติดต่อ. |
extra_streams | list[MsgStream] | อ่าน/เขียน | ได้รับหรือตั้งสตริมเพิ่มเติม. |
extra_storages | list[MsgStorage] | อ่าน/เขียน | ได้หรือตั้งที่เก็บของเพิ่มเติม. |
nameid_mapping | _NamedPropertyMapping | อ่าน/เขียน | ได้รับหรือกําหนดการสอดคล้อง nameid. |
major_version | int | อ่าน/เขียน | ได้หรือตั้งตัวอย่างหลัก. |
minor_version | int | อ่าน/เขียน | ได้หรือกําหนดรูปแบบเล็กๆ. |
transaction_signature_number | int | อ่าน/เขียน | ได้รับหรือกําหนดหมายเลขการลงนามของธุรกิจ. |
header_reserved_0 | bytes | อ่าน/เขียน | ได้รับหรือตั้งหัวข้อที่เก็บไว้เป็น 0. |
header_reserved_1 | bytes | อ่าน/เขียน | ได้รับหรือตั้งหัวข้อที่จองไว้ 1. |
emit_store_support_mask | bool | อ่าน/เขียน | ได้หรือตั้งตัวกรองรัดสเต็ปหน้ากาก. |
emit_compatibility_defaults | bool | อ่าน/เขียน | ได้รับหรือกําหนดค่าคอมพัทลุงของการส่งออก. |
preserve_declared_header_counts | bool | อ่าน/เขียน | ได้หรือกําหนดการนับหัวข้อที่ประกาศไว้ให้รักษา. |
declared_next_recipient_id | `int | None` | อ่าน/เขียน |
declared_next_attachment_id | `int | None` | อ่าน/เขียน |
declared_recipient_count | `int | None` | อ่าน/เขียน |
declared_attachment_count | `int | None` | อ่าน/เขียน |
Methods
| Signature | Description |
|---|---|
| `from_file(path: Path | str, strict: bool)→“MapiMessage”` |
from_msg_document(document: MsgDocument) → "MapiMessage" | การเรียกจาก_msg_document ในตัวอย่าง MapiMessage นี้. |
from_email_message(email_message: EmailMessage, unicode_strings: bool) → "MapiMessage" | การโทรจาก_email_message ในตัวอย่าง MapiMessage นี้. |
create(subject: str, body: str, unicode_strings: bool) → "MapiMessage" | การเรียกสร้างในตัวอย่าง MapiMessage นี้. |
iter_properties() → Iterator[MapiProperty] | เรียก iter_properties ในตัวอย่าง MapiMessage นี้. |
iter_property_keys(storage_stream_id: int) → Iterator[tuple[int, int]] | เรียก iter_property_keys ในตัวอย่าง MapiMessage นี้. |
| `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 | เรียก to_bytes ในตัวอย่าง MapiMessage นี้. |
to_email_message() → EmailMessage | โทรไป_email_message ในตัวอย่าง MapiMessage นี้. |
to_email_bytes() → bytes | โทรไป_email_bytes ในตัวอย่าง MapiMessage นี้. |
to_email_string() → str | เรียก to_email_string ในตัวอย่าง MapiMessage นี้. |
iter_attachments_info() → Iterator[MapiAttachment] | เรียก iter_attachments_info ในตัวอย่าง MapiMessage นี้. |
close() | เรียกใกล้ในตัวอย่างนี้ MapiMessage. |
to_msg_document() → MsgDocument | เรียก to_msg_document ในตัวอย่าง MapiMessage นี้. |