MapiMessage
خلاصه ای
MapiMessage یک کلاس در Aspose.Email FOSS برای پایتون است.
شیء MSG سطح بالا قابل تغییر با پشتیبانی از تبدیل MS G و EmailMessage است.
این کلاس ۲۲ روش برای کار با MapiMessage در برنامه های پایتون را فراهم می کند. روش های موجود شامل: 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 روش اضافی. همه اعضای عمومی پس از نصب بسته Aspose.Email FOSS برای پایتون به هر برنامه ی Python دسترسی دارند. خواص: attachments, body, body_html, declared_attachment_count, declared_next_attachment_id, declared_next_recipient_id,، و 19 تا ديگه .
خواص
| نام: | نوع: | Access | شرح: |
|---|---|---|---|
msg_reader | MsgReader | بخونید. | خوانندهٔ msg را دریافت میکند. |
validation_issues | tuple[str, ...] | بخونید. | مشکلات اعتبارسنجی را دریافت میکند. |
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. |
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` | خواندن/نوشتن |
روش ها
| Signature | شرح: |
|---|---|
| `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]] | در این MapiMessage کلید های iter_property را فرا می خواند. |
| `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 | تماس با_بایت در این MapiMessage نمونه. |
to_email_message() → EmailMessage | تماس با_email_message در این MapiMessage نمونه. |
to_email_bytes() → bytes | تماس با_email_bytes در این MapiMessage نمونه. |
to_email_string() → str | تماس با_email_string در این MapiMessage نمونه. |
iter_attachments_info() → Iterator[MapiAttachment] | در این MapiMessage به iter_attachments_info می گویند. |
close() | در این مورد MapiMessage نزدیک می شود. |
to_msg_document() → MsgDocument | تماس با_msg_document در این MapiMessage نمونه. |