Extracting individual emails from an email thread
First you can read about the format of ARPA internet text messages.

You're going to have to one up on Regex parsing if you are going to want to extract any meaningful info from the emails. I'd suggest the Oreilly book on regex, or reading over regular expressions.

There is also a tool to capture text from incoming emails and write to a text file.