Closed LeoQuote closed 8 years ago
I think it is handled- all headers are automatically encoded via the UnicodeHeaders
dictionary. The main issue would be the "real" sender and whether that is handled if there is some non-ascii value (I.e. the value passed to conn.sendmail
). I think the way to fix it is to modify the helpers.stringify_address
function or looking into the helpers.format_addresses
function and to add a test case for it as well.
If you're thinking about formatting the last one correctly - so you get "セかい <sekai@somedomain.jp>"
then no, there is no easy way to improve it without looking into regexes, and we all know how hard it is to validate email addresses :smirk:
Closing it as unfixable.
I want sender to be like this
['世界 <shijie@somedomain.cn>',"セかい<sekai@somedomain.jp>"]
but it could not be well-organized , the code didnt do anything special for this casehttps://github.com/eugene-eeo/mailthon/blob/master/mailthon/helpers.py#L38
How can I help to improve ,or that's impossible to improve?