If I understood correctly I do not think you even need to create a node to do this. Just import Nodemailer in a function node (you need to set an env variable to be able to do so) and use the simpleParser method.
This workflow contains a separate branch for testing.
The whole concept is to feed in the MIME text of an email message which then gets converted to a JSON array with all the relevant data, such as from, to, date, subject, body, html, messageId and attachments. It also convert the attachment buffers into Base64encoded text.
I already build something in FileMaker year’s ago, but this has become so complicated that it is difficult to maintain.
Since I’m fairly new to n8n and still have to get my head around a few basic concepts, this flow may be more complicated than necessary. So please do not hesitate to give me feedback