Use rtfparse to extract HTML message bodies from RTF containers and create mutlipart/alternative messages if both plain text and HTML are available

Also fixes #20.
This commit is contained in:
Joshua Tauberer
2024-02-23 09:07:37 -05:00
parent 6fc382e9a6
commit 4104dc937d
4 changed files with 53 additions and 22 deletions
+6 -4
View File
@@ -1,22 +1,24 @@
Convert Outlook .msg Files to .eml (MIME format)
================================================
This repository contains a Python 3.6 module for
This repository contains a Python 3.9+ module for
reading Microsoft Outlook .msg files and converting
them to .eml format, which is the standard MIME
format for email messages.
Install the dependencies with:
pip3.6 install -r requirements.txt
pip install -r requirements.txt
(You may need to create and activate a Python virtual environment first.)
Then either convert a single file by piping:
python3.6 outlookmsgfile.py < message.msg > message.eml
python outlookmsgfile.py < message.msg > message.eml
Or convert a set of files:
python3.6 outlookmsgfile.py *.msg
python outlookmsgfile.py *.msg
When passing filenames as command-line arguments, a new file with `.eml`
appended to the filename is written out with the message in MIME format.