The format of the header is thoroughly defined in rfc822 and rfc1522. Apart from a few details the header is very straight forward. The body, on the other hand, is somewhat more tricky to understand. Emil recognizes the encodings BinHex, Base64, Quoted-Printable and UUencode. Text is the parts of the message that is not recognized as being an encoded enclosure.
Text is a raw format whereas encoded data follows the syntax of the encoding.
Emil works in a two pass manner. After loading the message, it first interprets the header and body of the message before applying any conversions. First the format is recognized. This is done by interprating the header of the message. Then the data of the message is structured into a hierarchical message structure.