'A body type of type MESSAGE and subtype RFC822 contains,
immediately after the basic fields, the envelope structure,
body structure, and size in text lines of the encapsulated
message.'

def encode(self, extended):

    result = _SinglepartMessageStructure.encode(self, extended)
    contained = self.message.getSubPart(0)
    result.append(getEnvelope(contained))
    result.append(getBodyStructure(contained, False))
    result.append(getLineCount(contained))
    return result
