diff --git a/mailbody.js b/mailbody.js index 2c375ba74..198ad6e57 100644 --- a/mailbody.js +++ b/mailbody.js @@ -94,6 +94,10 @@ Body.prototype.parse_start = function (line) { enc = enc.toLowerCase().split("\n").pop().trim(); this.decode_function = this["decode_" + enc]; + if (!this.decode_function) { + logger.logerror("No decode function found for: " + enc); + this.decode_function = this.decode_8bit; + } this.ct = ct; if (/^(?:text|message)\//i.test(ct) && !/^attachment/i.test(cd) ) {