Pure Python CFB and Outlook MSG toolkit for reading, projecting, and writing message data.
Low maintenance activity. Last release 9 months ago, commits in 1 of the last 26 weeks. Weaker on commit activity and release cadence.
Consider insteadextract-msgPythie’s Index: 7611.1M downloads/moCompare →
pip install aspose-email-fossAspose.Email FOSS for Python
Aspose.Email FOSS for Python is a pure Python toolkit for working with:
- Compound File Binary (CFB) containers
- Outlook MSG files
- High-level MAPI-style message objects
email.message.EmailMessageconversion
It is focused on practical MSG read/write workflows in a lightweight open-source package.
Features
- Read CFB and Outlook MSG containers
- Inspect low-level storages, streams, and property bags
- Read, edit, and write messages through
MapiMessage - Work with recipients, attachments, and embedded messages
- Convert between MSG and
email.message.EmailMessage - Create new Outlook-compatible
.msgfiles in pure Python
Installation
pip install aspose-email-foss
Quick Start
from datetime import datetime, timezone
from aspose.email_foss import msg
message = msg.MapiMessage.create("Hello", "Body")
message.set_property(msg.PropertyId.SENDER_NAME, "Build Agent")
message.set_property(msg.PropertyId.SENDER_EMAIL_ADDRESS, "build.agent@example.com")
message.set_property(msg.PropertyId.MESSAGE_DELIVERY_TIME, datetime(2026, 3, 15, 10, 30, tzinfo=timezone.utc))
message.add_recipient("alice@example.com", display_name="Alice Example")
message.add_attachment("hello.txt", b"sample attachment\n", mime_type="text/plain")
message.save("example-message.msg")
with msg.MapiMessage.from_file("example-message.msg") as loaded:
email_message = loaded.to_email_message()
print(email_message["Subject"])
Package Entry Points
aspose.email_foss.msg.MapiMessage: high-level mutable MSG modelaspose.email_foss.msg.MsgReader: low-level MSG readeraspose.email_foss.msg.MsgWriter: low-level MSG writeraspose.email_foss.cfb.CFBReader: low-level CFB readeraspose.email_foss.cfb.CFBWriter: low-level CFB writer
Compatibility
Main supported scenarios:
- Read Outlook
.msgfiles - Write Outlook
.msgfiles