Please add "mail" param for attachments.
Opened this issue ยท 0 comments
kharalampidi commented
https://github.com/andris9/mailparser#attachment-streaming
mp.on("attachment", function(attachment, mail){
var output = fs.createWriteStream(attachment.generatedFileName);
attachment.stream.pipe(output);
});
https://github.com/chirag04/mail-listener2/blob/master/index.js#L115 ๐
Now:
parser.on("attachment", function (attachment) {
self.emit('attachment', attachment);
});
Need:
parser.on("attachment", function (attachment,mail) {
self.emit('attachment', attachment, mail);
});