Read an IMAP email and save it to a file

I need to read an e-mail using e-mail node and save it RAW to an eml file.
As I receive the json object, I wonder if it is possible to do with this mechanism

Thank you

You would have to try and reconstruct it from the object, there is no raw feed of the message provided by the underlying library as far as I can tell (imap - npm)

difficult to rebuild
Perhaps another way to do avoiding e-mail node?

Probably not, unless you want to manually try and re-implement the IMAP protocol with the TCP node (and that assumes no TLS)