How do I use mime-parser?

86 views
Skip to first unread message

netop...@thenetwork.email

unread,
Jan 8, 2017, 2:20:03 PM1/8/17
to Email.js Mailing List

Forgive me if this sounds like a dumb question, but I'm new to emailjs. Here is my code:

client.listMessages("INBOX", "1:10", ["uid", "flags", "envelope", "bodystructure", "body[]"]).then((messages) => {
  messages.forEach((message) => {
    console.log(message["body[]"]);
    console.log("------");
  });
});

I can see the content of my email, but I don't know how to parse the result. I'm going to output the messages in HTML, but there's a lot of stuff in there that doesn't need to be viewable, like MIME-Versions and such. I'm confused as to how I would integrate this into my code.

Reply all
Reply to author
Forward
0 new messages