RepositoryPythonUSUnited States
vikramarsid

vikramarsid/msg_parser

Python module to read, parse and converting Microsoft Outlook MSG E-Mail files.

60stars
21forks
12issues
1views

msg_parser

.. image:: https://img.shields.io/pypi/v/msg_parser.svg :target: https://pypi.python.org/pypi/msg_parser

.. image:: https://img.shields.io/travis/vikramarsid/msg_parser.svg :target: https://travis-ci.org/vikramarsid/msg_parser

.. image:: https://readthedocs.org/projects/msg-parser/badge/?version=latest :target: https://msg-parser.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

.. image:: https://pyup.io/repos/github/vikramarsid/msg_parser/shield.svg :target: https://pyup.io/repos/github/vikramarsid/msg_parser/ :alt: Updates

Python module for parsing outlook msg files.

Features

  • Parse MSG file.
  • Convert MSG file to EML file.
  • Output MSG file as JSON string.
  • Handles nested MSG/EML attachments.
  • Works 100% on Linux machines, do not require any windows libraries.

Installation

  • Basic installation

    .. code-block:: bash

    pip install msg_parser

  • With RTF decompression

    .. code-block:: bash

    pip install msg_parser[rtf]

Usage

  • Run CLI command

    .. code-block:: bash

     $ msg_parser --help
       usage: msg_parser [-h] -i FILE [-j] [-e EML_FILE]
    
      Microsoft Message Parser
    
      optional arguments:
          -h, --help            show this help message and exit
          -i FILE, --input FILE
                                msg file path
          -j, --json            output parsed msg as json to console
          -e EML_FILE, --eml EML_FILE
                                provide email file path to save as eml file.
    
  • Import in python modules

    .. code-block:: python

     from msg_parser import MsOxMessage
    
     msg_obj = MsOxMessage(msg_file_path)
    
     json_string = msg_obj.get_message_as_json()
    
     msg_properties_dict = msg_obj.get_properties()
    
     saved_path = msg_obj.save_email_file(output_eml_file_path)
    

Similar Projects

Discover other similar projects and AI models.

RepositoryC#
Sicos1977/MSGReader

C# Outlook MSG file reader without the need for Outlook

560
Nov 26, 2026
RepositoryJava
nickrussler/email-to-pdf-converter

Converts email files (eml, msg) to pdf

371
Nov 14, 2026
RepositoryTypeScript
microsoft/vscode

Visual Studio Code

195.9k
Nov 30, 2026
RepositoryTypeScript
molotochok/msg-viewer

This tool allows you to read Outlook .msg file in your browser without sending any data to an external server. It is extremely fast, works on any device as long as you have an Internet connection to open the page.

132
May 15, 2025
RepositoryPython
microsoft/markitdown

Python tool for converting files and office documents to Markdown.

199.5k
Dec 2, 2026
Repository
getify/You-Dont-Know-JS

A book series (2 published editions) on the JS language.

184.8k
Oct 31, 2026
RepositoryPython
opendatalab/MinerU

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

84.6k
Dec 2, 2026
RepositoryPython
docling-project/docling

Get your documents ready for gen AI

71.3k
Dec 2, 2026
RepositoryPython
tobymao/sqlglot

Python SQL Parser and Transpiler

9.8k
Dec 1, 2026