Small example to parse Thunderbird messages in mbox format:
The MIME class is the mixin which TEXT-MIME and MULTIPART-MIME inherit from. Most plain text messages will be of type TEXT-MIME and you can read the body with the CONTENT function. MULTIPART-MIME messages have multiple parts, you will have to iterate over them inspecting the type and subtype of each and choose what to do with them. In the example above, I was extracting the plain text version of html emails. See the wikipedia page on MIME and help yourself.