How the composer works:
--------------------------
Input data:

MessagePart classes represent the data of messages in an abstract way that is very close to
the way a GUI composer would see the data.  Thus, the composer takes the folowing input data:
* GlobalPart:
  - The charsets the user prefers.
  - Whether 8bit encoding is allowed.
* InfoPart:
  - Mode: compose the messages to be sent, or to be saved somewhere locally.
  - Sender and recipients.
  - The transport to use.
* TextPart:
  - The plain text and, optionally, the HTML text from an editor.
* Zero or more AttachmentParts:
  - The data and details (such as MIME type, file name) of an attachment.

--------------------------
Output data:

The composer outputs a single KMime::Message containing the assembled message.

--------------------------
Logic:
(NOTE: Based on messagecomposer.cpp in KMail. This does not apply. This is
TODO in the crypto composer.)

Definitions:
* Early attachment -- An attachment that has the same signing / crypto settings as the main
                      text part, and is joined with the text part before any signing or
                      encryption.
* Late attachment  -- An attachment that has different signing / crypto settings from the main
                      text part, and is encrypted, signed, and added only after the main part
                      has been signed and encrypted.

Algorithm:
1) Take the text content (plain or plain+HTML) and the early attachments, and compose them
   into contentBeforeCrypto.
2) For each recipient of the message, encrypt contentBeforeCrypto, encrypt and add the late
   attachments, save the recipients address (so that we know whom to send this message to),
   and save this as one of the final messages.

--------------------------
