I'm piping an imap library to the mailparser. I listen to 'end' and 'error' events of the mailparser. however, when an error occurs in the imap stream the application crashes since the error event is not imlemented in streams. is this on purpose/should I be listeninng to the imap stream as well for error events?
You should be listening to the imap stream error event, mailparser does not emit any errors by itself.
var imapstream = new ImapStream();
console.log("The stream failed for " + err);