MsgWriter

Overview

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

Serializer that writes a MsgDocument into a CFB-backed .msg payload.

This class provides 2 methods for working with MsgWriter objects in Python programs. Available methods include: to_bytes, write_file. All public members are accessible to any Python application after installing the Aspose.Email FOSS for Python package.

Methods

SignatureDescription
to_bytes(document: MsgDocument)bytesSerializes a MsgDocument into a bytes object representing an Outlook .msg file
write_file(document: MsgDocument, path: Path | str)Writes a MsgDocument to the given filesystem path as an Outlook .msg file

See Also