0

I'm currently using the module textract (making use of msg-extractor) to get all text content from msg files. But I get some encoding errors for some files which seem to be related to the open issues for textract (based on the link)

Are there other modules I can use to extract text from msg files? I'm using Python 3.6 for my development

2
  • You can try using third party library like msg-extractor Commented Sep 6, 2017 at 0:46
  • It's actually leveraging on the msg-extractor module. I've updated my post to reflect this. Apologies for the confusion Commented Sep 6, 2017 at 1:00

1 Answer 1

1

You can use extract_msg module for extracting the metadata from the .MSG files as well as the body.

import extract_msg with extract_msg.Message(filepath) as msg: msg_body = msg.body msg_subject = msg.subject print(msg_body) 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.