Open MonsieurLanza opened 5 years ago
what could be the expected message structure ? how the content should be displayed (witch properties, order) ? how the client code could be organized ? etc.
According to this Message structure could have 3 fields, replacing current body and body_is_plain
All of them should be arrays, of objects with metadata (MIME type, size), and data or uri to fetch that data, ordered by order of appearance in the MIME tree. Display choice between text_body and html_body if both are not empty would rely on user settings.
Main question is : what about mail message in attachments ? Recursive structure, separate one ?
Two cases :
message is unencrypted :
MIME Parsing is done by the backend, client will receive a fully constructed message json.
message is encrypted :
MIME Parsing will occur in the client. Content encoding will need attention, as will HTML sanitization.
Displaying multiple parts
In the case of multiple text inline & attachments parts or fowarded mails, use a similar expand/collapse mechanism than #1393