extract-msg
Extracts emails and attachments saved in Microsoft Outlook's .msg files
Decision gist · record as of 2026-08-14
Yes, if you need to parse Outlook .msg files. The package is actively maintained, has low install friction, and offers both CLI and library interfaces. However, note the GPL copyleft license—verify compatibility with your project's licensing before use in proprietary software.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or above.
- Low install friction with a pure-wheel distribution.
- Actively maintained with a recent release and 852 repository stars.
License · maintenance · safety
GPL (copyleft) — Licensed under GPL (copyleft). Use in proprietary software requires careful review of licensing obligations, as copyleft terms may require derivative works to be open-source.
last release 2026-08-14 (0 days) · last repo commit 2026-08-14 · 852 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 7,184,387 downloads/mo, #1,774 on PyPI
Alternatives
Verify before relying
pip install extract-msg
import extract_msg
msg = extract_msg.openMsg("path/to/file.msg")
# Access msg.from_, msg.to, msg.cc, msg.date, msg.subject, msg.body
# Or from command line:
# python -m extract_msg example.msg- Whether all output formats (HTML, PDF, RTF, JSON) are equally well-supported or have known limitations
- Performance characteristics when processing large .msg files or batch extraction scenarios
- Compatibility with .msg files from different Outlook versions or edge cases in MAPI property structure
What it is and what it does
extract-msg is a Python library and command-line tool that parses Microsoft Outlook .msg files and extracts their structured email data and attachments. It automates retrieval of standard email fields (from, to, cc, date, subject, body) and saves attachments to disk or other formats. The package handles OLE2 file parsing, Outlook's Extended MAPI property encoding, RTF decompression, and character set conversion through its runtime dependencies including olefile, compressed-rtf, RTFDE, ebcdic, beautifulsoup4, tzlocal, and red-black-tree-mod.
You can use it as a standalone CLI tool to batch-process .msg files into organized folder structures, or import it into Python code to programmatically read and transform Outlook messages. It supports output to plain text, HTML, PDF, RTF, raw, and JSON formats, with options to handle embedded messages, hidden attachments, and character set conversion. The package is actively maintained and supports Python 3.8 and above.
Use it for
- Batch extract emails and attachments from Outlook .msg files for archival or migration
- Convert Outlook messages to HTML or PDF for document management or compliance workflows
- Programmatically parse .msg files in a data pipeline to index email metadata or extract structured content
- Recover email data from .msg files for forensic analysis or email recovery scenarios
- Automate attachment extraction from a folder of .msg files with filtering by attachment type or hidden status
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to parse Outlook .msg files.
The package is actively maintained, has low install friction, and offers both CLI and library interfaces. However, note the GPL copyleft license—verify compatibility with your project's licensing before use in proprietary software.
Install
extract-msg on PyPI
Before you install
Low install friction with a pure-wheel distribution. Actively maintained with a recent release and 852 repository stars. Requires Python 3.8 or above.
Requires Python 3.8 or above.
License in practice
Licensed under GPL (copyleft). Use in proprietary software requires careful review of licensing obligations, as copyleft terms may require derivative works to be open-source.
Quickstart
pip install extract-msg
import extract_msg
msg = extract_msg.openMsg("path/to/file.msg")
# Access msg.from_, msg.to, msg.cc, msg.date, msg.subject, msg.body
# Or from command line:
# python -m extract_msg example.msg
Verify before relying
- Whether all output formats (HTML, PDF, RTF, JSON) are equally well-supported or have known limitations
- Performance characteristics when processing large .msg files or batch extraction scenarios
- Compatibility with .msg files from different Outlook versions or edge cases in MAPI property structure
Package facts
| License | GPL copyleft |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 7 packagesolefiletzlocalcompressed-rtfebcdicbeautifulsoup4RTFDEred-black-tree-mod |
| Maintenance | Actively maintained 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,184,387 / month, #1,774 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: extract_msg-0.56.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “extract outlook emails”
- extract-msgExtracts email metadata (from, to, cc, date, subject, body) and…
- msg-parserParses Microsoft Outlook MSG email files, extracting message data and…
- python-oxmsgParses Outlook MSG files to extract email messages, attachments, and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also mail-parser · python-oxmsg · tnefparse · RTFDE · rtfparse · msg-parser · eml-parser · emails · imap-tools · redmail