MapiMessage

Overview

MapiMessage is a class in Aspose.Email FOSS for Python.

Mutable high-level MSG object with MSG and EmailMessage conversion support.

Properties

NameTypeAccessDescription
msg_readerMsgReaderRead
validation_issuestuple[str, ...]Read
subjectstr | NoneRead
bodystr | NoneRead
message_classstr | NoneRead
body_htmlstr | NoneRead
unicode_stringsboolRead
propertiesMapiPropertyCollectionRead
recipientslist[MapiRecipient]Read
attachmentslist[MapiAttachment]Read
extra_streamslist[MsgStream]Read
extra_storageslist[MsgStorage]Read
nameid_mapping_NamedPropertyMappingRead
major_versionintRead
minor_versionintRead
transaction_signature_numberintRead
header_reserved_0bytesRead
header_reserved_1bytesRead
emit_store_support_maskboolRead
emit_compatibility_defaultsboolRead
preserve_declared_header_countsboolRead
declared_next_recipient_idint | NoneRead
declared_next_attachment_idint | NoneRead
declared_recipient_countint | NoneRead
declared_attachment_countint | NoneRead

Methods

SignatureDescription
from_file(path: Path | str, strict: bool)"MapiMessage"
from_msg_document(document: MsgDocument)"MapiMessage"
from_email_message(email_message: EmailMessage, unicode_strings: bool)"MapiMessage"
create(subject: str, body: str, unicode_strings: bool)"MapiMessage"
iter_properties()Iterator[MapiProperty]
iter_property_keys(storage_stream_id: int)Iterator[tuple[int, int]]
set_property(property_id: int | CommonMessagePropertyId | PropertyId, property_type_or_value: int | PropertyTypeCode | Any, value: Any, flags: int)MapiProperty
get_property(property_id: int | CommonMessagePropertyId | PropertyId, property_type: int | None, storage_stream_id: int | None, decode: bool | None)MapiProperty | Any | None
get_property_value(property_id: int | CommonMessagePropertyId | PropertyId, property_type: int | None, storage_stream_id: int, decode: bool)Any | None
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 | None
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 | None)MapiAttachment
add_embedded_message_attachment(message: "MapiMessage", filename: str | None, mime_type: str | None)MapiAttachment
save(path: Path | str)
to_bytes()bytes
to_email_message()EmailMessage
to_email_bytes()bytes
to_email_string()str
iter_attachments_info()Iterator[MapiAttachment]
close()
to_msg_document()MsgDocument

See Also