whiteout-io/imap-client — pull request #13 by felixhammerl (2014-05-06 09:42:25+00:00)
Title: [WO-286] change data model to support html and signed msgs

this change to the data model allows to take into account the nested nature of email mime trees.
```
{
text: '...',
textParts: [...]
attachments: [...]
}
```
becomes
```
{ messageParts: [...] }
```
where every `messagePart` has a type (`text`, `html`, `attachment`, `signed`, `encrypted`), and `content` (`Uint8Array` for type `attachment`, `String` for types `text` and `html`, or `Array` for the nested types `encrypted` and `signed`).
`signed` messageParts have their signed portion of the mail's flattened mime tree in the property `signed` and the corresponding pgp signature in `signature`, both `Strings`.

`#listMessagesByUid` becomes `listMessages` since the prefix 'ByUid' no longer makes sense.

`#getBody` becomes '#getMessageParts' which receives an array of `messageParts`. The content returned from the imap server is no longer parsed in the imap-client. Use the mailreader for parsing.

`#getAttachment` is no longer necessary and removed. it was pretty much duplicated code anyway and the change to generic `messageParts` that are no longer parsed in the imap-client makes it obsolete.