libpEpMIME

libpEpMIME is a replacement for libetpan for platforms that have a C++14 compiler. :-)

Generating MIME from struct _message

html := longmsg_formatted att_i := attachments with filename.starts_with(“cid://”) add_o := other attachments

shortmsg longmsg html att_i att_o Result
not set not set not set not set not set ERROR!
set not set not set not set not set text/plain (empty)
* set not set not set not set text/plain
* not set set not set not set text/html
* set set not set not set multipart/alternative { text/plain, text/html }
* not set not set set not set mp/mixed { att… }
* set not set set not set mp/mixed { text/plain, att… }
* not set set set not set mp/related { text/html, att… }
* set set set not set mp/alt{ text/plain, mp/related { text/html, att… }
* not set not set not set set mp/mixed { att…}
* set not set not set set mp/mixed { text/plain, att… }
* not set set not set set mp/mixed { text/html, att…}
* set set not set set mp/mixed { mp/alt{t/p, t/h}, att… }
* not set not set set set mp/mixed { att… }
* set not set set set mp/mixed { text/plain, att… }
" not set set set set mp/mixed { mp/related { t/h, att_i… }, att… }
* set set set set mp/mixed { mp/alt { t/p, mp/rel { t/h, att_i… }, att… }
MIME-Type decision matrix

MIME-Type decision matrix