msg-parser 1.2.0


pip install msg-parser

  Latest version

Released: Dec 14, 2019

Project Links

Meta
Author: Vikram Arsid
Requires Python: >=3.4

Classifiers

Development Status
  • 2 - Pre-Alpha

Topic
  • Communications

Intended Audience
  • Developers

License
  • OSI Approved :: BSD License

Natural Language
  • English

Programming Language
  • Python :: 3
  • Python :: 3.4
  • Python :: 3.5
  • Python :: 3.6
  • Python :: 3.7
  • Python :: Implementation :: CPython
https://img.shields.io/pypi/v/msg_parser.svg https://img.shields.io/travis/vikramarsid/msg_parser.svg Documentation Status 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

    pip install msg_parser
  • With RTF decompression

    pip install msg_parser[rtf]

Usage

  • Run CLI command

    $ 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

    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)

Wheel compatibility matrix

Platform Python 2 Python 3
any

Files in release

Extras:
Dependencies:
olefile (>=0.46)