Closed ip6li closed 6 years ago
I have this problem too.
Error: Encoding not recognized: 'ISO-2022-JP' (searched as: 'iso2022jp')
at Object.getCodec (/home/lion/repos/aosc/email-bot/node_modules/iconv-lite/lib/index.js:102:23)
at Object.getDecoder (/home/lion/repos/aosc/email-bot/node_modules/iconv-lite/lib/index.js:118:23)
at Object.decode (/home/lion/repos/aosc/email-bot/node_modules/iconv-lite/lib/index.js:36:25)
at convertIconvLite (/home/lion/repos/aosc/email-bot/node_modules/encoding/lib/encoding.js:91:26)
at convert (/home/lion/repos/aosc/email-bot/node_modules/encoding/lib/encoding.js:51:22)
at Object.decodeBase64 (/home/lion/repos/aosc/email-bot/node_modules/mimelib/lib/mimelib.js:248:16)
at Object.decodeMimeWord (/home/lion/repos/aosc/email-bot/node_modules/mimelib/lib/mimelib.js:321:25)
at Object.module.exports.decodeMimeWord (/home/lion/repos/aosc/email-bot/node_modules/mimelib/lib/mimelib.js:55:41)
at MailParser.<anonymous> (/home/lion/repos/aosc/email-bot/node_modules/mailparser/lib/mailparser.js:1388:24)
at RegExp.[Symbol.replace] (native)
I think it should handle this (when it calls to mimelib
) and raise an error
event.
Version: mailparser@0.6.1 iconv@2.2.1 nodejs: v6.3.1
Log is filled with messages like:
Does mailparser support some type of error handling?
should get an error object, if mailparser detects a problem, so application can act on error.
function where this happens:
That function get a mail object from npm imap module (it read mail from a Dovecot server), checks for a specific email address in list of recipients, renders a message and send result to a callback. If error situation while parsing cannot be handled, this may yield into problems while processing following steps.