MsgReader

Overview

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

Normative top-level MSG containment and stream requirements for container traversal.

Properties

NameTypeAccessDescription
cfb_readerCFBReaderReadProvides access to the underlying CFBReader handling the MSG container
storage_layoutStorageLayoutReadDescribes the layout of storages within the MSG file
strictboolReadIndicates whether parsing errors raise exceptions or are recorded as validation issues
validation_issuesTuple[str, ...]ReadContains a tuple of strings describing non‑critical parsing problems
PROPERTY_STREAM_HEADER_TOP_LEVEL_LAYOUTDict[str, Tuple[int, int]]ReadHolds the constant dict defining offsets and sizes for top‑level header fields
PROPERTY_STREAM_HEADER_SUBOBJECT_LAYOUTDict[str, Tuple[int, int]]ReadRepresents the fixed layout of subobject property stream headers
PROPERTY_ENTRY_FIXED_LENGTH_LAYOUTDict[str, Tuple[int, int]]ReadHolds the constant dict defining offsets and sizes for fixed‑length property entries

Methods

SignatureDescription
__init__(cfb_reader: CFBReader, strict: bool)
from_file(path: Path | str, strict: bool)"MsgReader"
close()Releases resources associated with the underlying CFB container
iter_top_level_fixed_length_properties()Iterator[PropertyEntryFixedLength]Yields fixed‑length property entries from the top‑level property stream
iter_recipient_storages()Iterator[DirectoryEntry]Iterates over directory entries that store recipient data
iter_attachment_storages()Iterator[DirectoryEntry]Iterates over directory entries that store attachment data
parse_message_property_stream(storage_stream_id: int)Tuple[PropertyStreamHeaderTopLevel, List[PropertyEntryFixedLength]]Read the property stream in the top level or an embedded-message storage.
parse_subobject_property_stream(storage_stream_id: int)Tuple[PropertyStreamHeaderSubobject, List[PropertyEntryFixedLength]]Read the property stream in recipient/attachment storage and decode fixed-length entries.
parse_top_level_property_stream(data: bytes)Tuple[PropertyStreamHeaderTopLevel, List[PropertyEntryFixedLength]]Decode top-level property stream header and fixed-length entries.
parse_subobject_property_stream_data(data: bytes)Tuple[PropertyStreamHeaderSubobject, List[PropertyEntryFixedLength]]Decode recipient/attachment property stream header and fixed-length entries.

See Also