Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
*.msg
*.eml
__pycache__
*.egg-info
52 changes: 52 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"cSpell.words": [
"ADDRTYPE",
"ADDRTYPES",
"APPT",
"APPTIME",
"CHILDRENS",
"CLSID",
"CODEPAGE",
"compoundfiles",
"CORRELATOR",
"CPID",
"decapsulator",
"DELTAX",
"DELTAY",
"EITS",
"ENTRYID",
"ENTRYIDS",
"HASATTACH",
"innerstream",
"INTTIME",
"IPMS",
"ISDN",
"levelname",
"MAILUSER",
"MAPI",
"mapidefs",
"mapitags",
"messagebody",
"MTSID",
"outlookmsg",
"outlookmsgfile",
"RCVD",
"RECIP",
"ROWID",
"rtfparse",
"SENTMAIL",
"SRESTRICT",
"streamname",
"SUBFOLDERS",
"substg",
"SVREID",
"SYSTIME",
"Tauberer",
"TEMPLATEID",
"TNEF",
"TTYTDD",
"UIDS",
"XPOS",
"YPOS"
]
}
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,25 @@ to unpack HTML message bodies, and
back-fill plain text message bodies when only an HTML body
is present.

Install the dependencies with:

pip install -r requirements.txt
Install the package and dependencies with:
pip install .

(You may need to create and activate a Python virtual environment first.)

Then either convert a single file by piping:

python outlookmsgfile.py < message.msg > message.eml
outlookmsgfile < message.msg > message.eml

Or convert a set of files:

python outlookmsgfile.py *.msg
outlookmsgfile *.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.

To use it in your application

import outlookmsgfile
eml = outlookmsgfile.load('my_email_sample.msg')
import outlookmsg
eml = outlookmsg.load('my_email_sample.msg')

The ``load()`` function returns an [EmailMessage](https://docs.python.org/3/library/email.message.html#email.message.EmailMessage) instance.
Loading