MsgReader
Overview
MsgReader is a class in Aspose.Email FOSS for Python.
Normative top-level MSG containment and stream requirements for container traversal.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
cfb_reader | CFBReader | Read | Provides access to the underlying CFBReader handling the MSG container |
storage_layout | StorageLayout | Read | Describes the layout of storages within the MSG file |
strict | bool | Read | Indicates whether parsing errors raise exceptions or are recorded as validation issues |
validation_issues | Tuple[str, ...] | Read | Contains a tuple of strings describing non‑critical parsing problems |
PROPERTY_STREAM_HEADER_TOP_LEVEL_LAYOUT | Dict[str, Tuple[int, int]] | Read | Holds the constant dict defining offsets and sizes for top‑level header fields |
PROPERTY_STREAM_HEADER_SUBOBJECT_LAYOUT | Dict[str, Tuple[int, int]] | Read | Represents the fixed layout of subobject property stream headers |
PROPERTY_ENTRY_FIXED_LENGTH_LAYOUT | Dict[str, Tuple[int, int]] | Read | Holds the constant dict defining offsets and sizes for fixed‑length property entries |
Methods
| Signature | Description |
|---|---|
__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. |