MapiMessage

MapiMessage

Przegląd

MapiMessage jest klasą w Aspose.Email FOSS dla Python.

Mutowalny wysokopoziomowy obiekt MSG z obsługą konwersji MSG i EmailMessage.

Ta klasa udostępnia 22 metody do pracy z obiektami MapiMessage w programach Python. Dostępne metody obejmują: 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 oraz 10 dodatkowych metod. Wszystkie publiczne członki są dostępne dla każdej aplikacji Python po zainstalowaniu pakietu Aspose.Email FOSS dla Python. Właściwości: attachments, body, body_html, declared_attachment_count, declared_next_attachment_id, declared_next_recipient_id oraz 19 kolejnych.

Właściwości

NazwaTypDostępOpis
msg_readerMsgReaderOdczytPobiera czytnik wiadomości.
validation_issuestuple[str, ...]OdczytZwraca problemy walidacji.
subject`strNone`Odczyt/zapis
body`strNone`Odczyt/zapis
message_class`strNone`Odczyt/zapis
body_html`strNone`Odczyt/zapis
unicode_stringsboolOdczyt/zapisPobiera lub ustawia ciągi Unicode.
propertiesMapiPropertyCollectionOdczyt/zapisPobiera lub ustawia właściwości.
recipientslist[MapiRecipient]Odczyt/zapisPobiera lub ustawia odbiorców.
attachmentslist[MapiAttachment]Odczyt/zapisPobiera lub ustawia załączniki.
extra_streamslist[MsgStream]Odczyt/zapisPobiera lub ustawia dodatkowe strumienie.
extra_storageslist[MsgStorage]Odczyt/zapisPobiera lub ustawia dodatkowe magazyny.
nameid_mapping_NamedPropertyMappingOdczyt/zapisPobiera lub ustawia mapowanie nameid.
major_versionintOdczyt/zapisPobiera lub ustawia główną wersję.
minor_versionintOdczyt/zapisPobiera lub ustawia wersję pomocniczą.
transaction_signature_numberintOdczyt/zapisPobiera lub ustawia numer sygnatury transakcji.
header_reserved_0bytesOdczyt/zapisPobiera lub ustawia nagłówek rezerwowany 0.
header_reserved_1bytesOdczyt/zapisPobiera lub ustawia nagłówek zarezerwowany 1.
emit_store_support_maskboolOdczyt/zapisPobiera lub ustawia maskę obsługi przechowywania emit.
emit_compatibility_defaultsboolOdczyt/zapisPobiera lub ustawia domyślne ustawienia zgodności emitowania.
preserve_declared_header_countsboolOdczyt/zapisPobiera lub ustawia liczbę zachowanych zadeklarowanych nagłówków.
declared_next_recipient_id`intNone`Odczyt/zapis
declared_next_attachment_id`intNone`Odczyt/zapis
declared_recipient_count`intNone`Odczyt/zapis
declared_attachment_count`intNone`Odczyt/zapis

Metody

SygnaturaOpis
`from_file(path: Pathstr, strict: bool)→“MapiMessage”`
from_msg_document(document: MsgDocument) → "MapiMessage"Wywołuje from_msg_document(document) na tej instancji MapiMessage.
from_email_message(email_message: EmailMessage, unicode_strings: bool) → "MapiMessage"Wywołuje from_email_message(email_message, unicode_strings) na tej instancji MapiMessage.
create(subject: str, body: str, unicode_strings: bool) → "MapiMessage"Wywołuje create(subject, body, unicode_strings) na tej instancji MapiMessage.
iter_properties() → Iterator[MapiProperty]Wywołuje iter_properties na tej instancji MapiMessage.
iter_property_keys(storage_stream_id: int) → Iterator[tuple[int, int]]Wywołuje iter_property_keys(storage_stream_id) na tej instancji MapiMessage.
`set_property(property_id: intCommonMessagePropertyId
`get_property(property_id: intCommonMessagePropertyId
`get_property_value(property_id: intCommonMessagePropertyId
`set_named_property(named_property: MapiNamedProperty, property_type: intPropertyTypeCode, value: Any, flags: int)→MapiProperty`
`get_named_property(named_property: MapiNamedProperty, property_type: intNone)→MapiProperty
`add_recipient(email_address: str, display_name: strNone, recipient_type: int)→MapiRecipient`
`add_attachment(filename: str, data: bytes, mime_type: strNone, content_id: str
`add_embedded_message_attachment(message: “MapiMessage”, filename: strNone, mime_type: str
`save(path: Pathstr)`
to_bytes() → bytesWywołuje to_bytes na tej instancji MapiMessage.
to_email_message() → EmailMessageWywołuje to_email_message na tej instancji MapiMessage.
to_email_bytes() → bytesWywołuje to_email_bytes na tej instancji MapiMessage.
to_email_string() → strWywołuje to_email_string na tej instancji MapiMessage.
iter_attachments_info() → Iterator[MapiAttachment]Wywołuje iter_attachments_info na tej instancji MapiMessage.
close()Wywołuje close na tej instancji MapiMessage.
to_msg_document() → MsgDocumentWywołuje to_msg_document na tej instancji MapiMessage.

Zobacz także

 Polski