PropertyCollection{Categorie:Documentele de activitate}
Opinie generală
MapiMessage este o clasă în Aspose.Email pentru Python.
Obiect MSG mutabil de nivel înalt cu suport pentru conversie MS G și EmailMessage.
Proprietăți
| Numele de proprietate | Tipul de vehicul | Accesul | Descriere: |
|---|---|---|---|
msg_reader | MsgReader | Citeşte. | Oferă acces la MsgReader subiacent folosit pentru acest mesaj |
validation_issues | tuple[str, ...] | Citeşte. | Conține o serie de șiruri care descrie orice probleme de validare. |
subject | `str | None` | Citeşte. |
body | `str | None` | Citeşte. |
message_class | `str | None` | Citeşte. |
body_html | `str | None` | Citeşte. |
unicode_strings | bool | Citeşte. | Indică dacă proprietățile șirului sunt stocate ca Unicode. |
properties | MapiPropertyCollection | Citeşte. | Este o colecție de toate obiectele MapiProperty din mesaj. |
recipients | list[MapiRecipient] | Citeşte. | Este o listă de MapiRecipient obiecte care reprezintă destinatarii mesajelor |
attachments | list[MapiAttachment] | Citeşte. | Este o listă de MapiAttachment obiectele atașate la mesajul |
extra_streams | list[MsgStream] | Citeşte. | Conține obiecte suplimentare MsgStream prezente în fișierul MSG |
extra_storages | list[MsgStorage] | Citeşte. | Conține obiecte suplimentare MsgStorage prezente în fișierul MSG |
nameid_mapping | _NamedPropertyMapping | Citeşte. | Oferă maparea pentru ID-urile de proprietate numite utilizate în mesaj |
major_version | int | Citeşte. | Stochează numărul principal al versiunii formatului MSG. |
minor_version | int | Citeşte. | Stochează numărul versiunii secundare a formatului MSG. |
transaction_signature_number | int | Citeşte. | Conține numărul de semnătură utilizat pentru urmărirea tranzacțiilor. |
header_reserved_0 | bytes | Citeşte. | Conține primul bloc de bați rezervate intitulat |
header_reserved_1 | bytes | Citeşte. | Conține al doilea bloc de bați rezervate intitulat |
emit_store_support_mask | bool | Citeşte. | Se comută emisiunea mască de suport magazin atunci când scrie |
emit_compatibility_defaults | bool | Citeşte. | Controlul dacă sunt emise defecte de compatibilitate |
preserve_declared_header_counts | bool | Citeşte. | Indică dacă numărul de capete declarate trebuie păstrat la înregistrare. |
declared_next_recipient_id | `int | None` | Citeşte. |
declared_next_attachment_id | `int | None` | Citeşte. |
declared_recipient_count | `int | None` | Citeşte. |
declared_attachment_count | `int | None` | Citeşte. |
Metode de evaluare
| Semnătura | Descriere: |
|---|---|
| `from_file(path: Path | str, strict: bool)→“MapiMessage”` |
from_msg_document(document: MsgDocument) → "MapiMessage" | Creează un MapiMessage dintr-un MsgDocument existent. |
from_email_message(email_message: EmailMessage, unicode_strings: bool) → "MapiMessage" | Convertează un EmailMessage într-un MapiMessage, opțional folosind șiruri Unicode. |
create(subject: str, body: str, unicode_strings: bool) → "MapiMessage" | creates a new Outlook‑compatible message object that can be modified withset_property, add_recipient, add_attachment, and saved with (în mod normal, în funcție de modul de desfășurare) ̋ |
iter_properties() → Iterator[MapiProperty] | Iterate pe toate obiectele MapiProperty din mesaj |
iter_property_keys(storage_stream_id: int) → Iterator[tuple[int, int]] | Răscumpărări (property_id, storage_stream_d) pentru un flux de stocare |
| `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 | Serializează mesajul în format MSG şi returnează baitii. |
to_email_message() → EmailMessage | Convertează un model MSG într-un obiect standard de bibliotecă email.message.EmailMessage |
to_email_bytes() → bytes | Întoarce mesajul ca byte .eml crude |
to_email_string() → str | Întoarce mesajul ca o șiră în format .eml |
iter_attachments_info() → Iterator[MapiAttachment] | Iterate pe toate obiectele atașament în mesaj |
close() | Eliberă orice resurse deținute de instanța mesajului |
to_msg_document() → MsgDocument | Convertează mesajul de nivel înalt într-un mesaj de grad scăzut MsgDocument |