chirag04 / mail-listener2

Mail listener library for node.js. Get notification when new email arrived.
MIT License
245 stars 116 forks source link

TypeError: mime.extension is not a function #75

Open Pranav-Dakshina opened 6 years ago

Pranav-Dakshina commented 6 years ago

I get this error when I run Mail-listener2, I guess this is because mailparser in the dependencies is ~0.4.6, The latest mailparser solves this issue.

andreihaiducu commented 6 years ago

I could easily fix this with mime.getExtension(contentType)

Pranav-Dakshina commented 6 years ago

@andreihaiducu Yeah that works too. I think they have added this change in mailparser 0.6.2.

andreihaiducu commented 6 years ago

can you tell me which version of mail-listener i can get ? I'm trying to implement a mail listener but can't find a good version. Tried mail-listener3 and mail-listener2 both give same error : mime.extension not a function . Thanks

Pranav-Dakshina commented 6 years ago

@andreihaiducu try mail-listener4. I have added this change in that.

VivekPowar commented 5 years ago

@Pranav-Dakshina how to download attachment file in attachment.path is undefined mailListener.on("attachment", function(attachment){ console.log(attachment.path); });