This module enables reading, parsing and converting Microsoft Outlook MSG E-Mail files.
Project description
Python module for parsing outlook msg files.
Free software: BSD license
Documentation: https://msg-parser.readthedocs.io.
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
msg_parser-1.2.0.tar.gz
(9.5 MB
view hashes)
Built Distribution
msg_parser-1.2.0-py2.py3-none-any.whl
(101.8 kB
view hashes)
Close
Hashes for msg_parser-1.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d47a2f0b2a359cb189fad83cc991b63ea781ecc70d91410324273fbf93e95375 |
|
MD5 | 164d01cbe8727a13504561e91daa8021 |
|
BLAKE2b-256 | 158b5738b32acc6acdf92d04d5e691bf70a379e78264e55843542e1888d4a10e |