Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save documentprocessing/9e6ca2e622e7c80ff30ee3a49e70d656 to your computer and use it in GitHub Desktop.
Save documentprocessing/9e6ca2e622e7c80ff30ee3a49e70d656 to your computer and use it in GitHub Desktop.
Read message details from MSG file
import extract_msg
# open message file
msg = extract_msg.openMsg("input.msg")
# print sender name
print('Sender: {}'.format(msg.sender))
# print date
print('Sent On: {}'.format(msg.date))
# print subject
print('Subject: {}'.format(msg.subject))
# print body
print('Body: {}'.format(msg.body))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment