circuithub / mail-listener

Mail listener library for node.js. Get notification when new email arrived.
134 stars 32 forks source link

Error fetching attachments #27

Open sprsoft opened 11 years ago

sprsoft commented 11 years ago

I cannot retrive basic attachments from an email. The only ones that can be managed are those who are embeded into the HTML body. All others attachments are not processed because the content-type of those lines from IMAP are declared as plain/text

So next line from mailparser.js will set the flag to false:

textContent = ["text/plain", "text/html"].indexOf(
          this._currentNode.meta.contentType || "") >= 0;
...
...
this._currentNode.attachment = false;

I know it's not a bug related directly with your project but it's so generic that i cannot understand that nobody has ever got it