Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Extracts emails and attachments saved in Microsoft Outlook's .msg files

Project description


Actions Status

Extracts emails and attachments saved in Microsoft Outlook's .msg files

The python package extract_msg automates the extraction of key email data (from, to, cc, date, subject, body) and the email's attachments.


You can install the package from PyPI as msglite. Then use the API as follows:

from msglite import Message

msg = Message('path/to/message.msg')
# The API currently does not differentiate Sender and From cleanly:

Notes on encoding

Field types:

  • 001E - PtypString8 - Non-unicode string
  • 001F - PtypString - UTF-18 LE string
  • 0102 - PtypBinary - Blob


This package is a lightweight and functionally extended fork of msg-extractor written by Matthew Walker and Ken Peterson.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for msglite, version 0.30.0
Filename, size File type Python version Upload date Hashes
Filename, size msglite-0.30.0-py2.py3-none-any.whl (27.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size msglite-0.30.0.tar.gz (26.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page