MsgReader
Overview
MsgReader is a class in Aspose.Email FOSS for Python.
Normative top-level MSG containment and stream requirements for container traversal.
This class provides 10 methods for working with MsgReader objects in Python programs.
Available methods include: __init__, close, from_file, iter_attachment_storages, iter_recipient_storages, iter_top_level_fixed_length_properties, parse_message_property_stream, parse_subobject_property_stream, parse_subobject_property_stream_data, parse_top_level_property_stream.
All public members are accessible to any Python application after installing the Aspose.Email FOSS for Python package.
Properties: PROPERTY_ENTRY_FIXED_LENGTH_LAYOUT, PROPERTY_STREAM_HEADER_SUBOBJECT_LAYOUT, PROPERTY_STREAM_HEADER_TOP_LEVEL_LAYOUT, cfb_reader, storage_layout, strict, and 1 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
cfb_reader | CFBReader | Read | Gets the cfb reader. |
storage_layout | StorageLayout | Read | Gets the storage layout. |
strict | bool | Read | Gets the strict. |
validation_issues | Tuple[str, ...] | Read | Gets the validation issues. |
PROPERTY_STREAM_HEADER_TOP_LEVEL_LAYOUT | Dict[str, Tuple[int, int]] | Read | Gets the property stream header top level layout. |
PROPERTY_STREAM_HEADER_SUBOBJECT_LAYOUT | Dict[str, Tuple[int, int]] | Read | Gets the property stream header subobject layout. |
PROPERTY_ENTRY_FIXED_LENGTH_LAYOUT | Dict[str, Tuple[int, int]] | Read | Gets the property entry fixed length layout. |
Methods
| Signature | Description |
|---|---|
__init__(cfb_reader: CFBReader, strict: bool) | Calls init on this MsgReader instance. |
from_file(path: Path | str, strict: bool) → "MsgReader" | Calls from_file on this MsgReader instance. |
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. |