I'm not sure why you need to strip them, but the headers has simple format you can find here:
http://www.ietf.org/rfc.html[
^] by RFC numbers 2045 to 2049.
Basically, each header goes on a separate line with possible continuation lines. An empty line signals that comments are finishes and the next line will start the e-mail body. However, do you know how to deal with multipart emails with separate MIME declaration for each part? You certainly need this is you want to parse e-mails by your own code, but this is way more difficult than just the strip of the e-mail headers.
—SA