I'm looking for a node.js module that can parse my IMAP request - FETCH 1 BODY[TEXT]. I need multipart parser, because I have messages with few levels in hierarchy.
Example of message:
--94eb2c032ec81bf420053483f579
Content-Type: multipart/alternative; boundary=94eb2c032ec81bf411053483f577
--94eb2c032ec81bf411053483f577
Content-Type: text/plain; charset=UTF-8
test
--94eb2c032ec81bf411053483f577
Content-Type: text/html; charset=UTF-8
<div dir="ltr">test</div>
--94eb2c032ec81bf411053483f577--
--94eb2c032ec81bf420053483f579
Content-Type: image/x-icon; name="favicon.ico"
Content-Disposition: attachment; filename="favicon.ico"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ip2cdokt0
AAABAAEAEA8AAAEAIA... THIS IS ATTACHMENT ...A8AcAAPw/AAA=
--94eb2c032ec81bf420053483f579--)