E-mails can vary in structural complexity:
At their simplest, they consist of headers and a message.
However, the e-mail can also contain attachments. The e-mail then consists of the general headers, such as “Subject” and “From”, the message (with its own headers) and the attachments (with their own headers).
In the most complex case, the e-mail has an attachment containing a further e-mail, which can in turn contain attachments and/or other e-mails as attachments, and so on.
The mail reader analyzes the e-mail, subdivides it for procedural processing into smaller packages and makes these individually processable packages available to the procedures. Within the procedures this permits access to the headers of the e-mail and the individual attachments, regardless of the complexity of the e-mail’s structure.
The mail reader converts all the data received from the IMAP or POP3 server from ISO-8859-1 to EDF041. If a MIME part of the mail is used as the 'base64' Content-Transfer-Encoding and the content type is 'text', the data is in turn converted from ISO-8859-1 to EDF041 in accordance with the base64 decoder. In all other cases, the processing procedures must execute any necessary character set conversion.