Question: Need help with writing python code (v 2.7.x) to traverse through a folder structure, read all the text files (emails) and extract From and To

Need help with writing python code (v 2.7.x) to traverse through a folder structure, read all the text files (emails) and extract From and To email addresses and write the output to a CSV file.

email format Need help with writing python code (v 2.7.x) to traverse through a

Folder structure

Mailbox Name1 text 1
text 2
Name 2 text 3
text 4
text 5

Message-ID: Date: Fri, 7 Dec 2001 10:06:42 -0800 (PST) From: heather.dunton@enron.com To: k..allen@enron.com Subject: RE: West Position Mime-Version 1.0 Content-Type: text/plain; charset-us-ascii Content-Transfer-Encoding: 7bit X-From: Dunton, Heather /OU-NA/CN-RECIPIENTS/CN-HDUNTO X-To: Allen, Phillip K. ENRON/OU-NA/CN-RECIPIENTS/CN-Pallern X-CC: X-bcc: X-Folder: \Phillip_Allen_Jan2002_1\Allen, Phillip K. \Inbox X-Origin: Allen-P X-FileName: pallen (Non-Privileged) .pst Please let me know if you still need Curve Shift. Thanks, Heather

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!