Open houshuang opened 9 years ago
gen_smtp uses iconv
under the hood to deal with encodings. At least in my system iconv don't know such encoding:
$ echo "123" | LANG=en_US iconv -f iso-8859-8-i -t utf8
iconv: conversion from `iso-8859-8-i' is not supported
Try `iconv --help' or `iconv --usage' for more information.
I could submit a request upstream to iconv, but in the meantime how do I prevent this error or trap it (there's no line number in the error message so I'm not even sure exactly where the error is being triggered). I'm not even interested in this e-mail - it's an automatic reply to a noreply@ email, but I don't want it to keep generating hundreds of errors.
On Tue, Aug 11, 2015 at 3:59 PM, Sergey Prokhorov notifications@github.com wrote:
gen_smtp uses iconv under the hood to deal with encodings. At least in my system iconv don't know such encoding:
$ echo "123" | LANG=en_US iconv -f iso-8859-8-i -t utf8 iconv: conversion from
iso-8859-8-i' is not supported Try
iconv --help' or `iconv --usage' for more information.— Reply to this email directly or view it on GitHub https://github.com/Vagabond/gen_smtp/issues/88#issuecomment-130046028.
http://reganmian.net/blog -- Random Stuff that Matters
Could you add a test case with the above email so that we can make it handle this error a bit more graceful?
We might want to return an error code: 553 Email character set not accepted
See also #145
I'm getting a ton of errors like the ones below, because apparently this server keeps resending the email every few minutes. (I removed the sender email for privacy reasons).
According to Wikiepdia, iso-8859-8-i is indeed a valid character encoding. Anyway, even if it were not, I would rather that it just parse it using ASCII or something, instead of blowing up, maybe with a warning - my app sends me an email on every error - and I've gotten a lot of error emails because of this one email that keeps getting resent.