Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

License

Notifications You must be signed in to change notification settings

pingintel/msg_parser

Open more actions menu
 
 

Repository files navigation

msg_parser

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)

About

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

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.5%
  • Makefile 3.5%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.