[issue39771] EmailMessage.add_header doesn't work

hwgdb Smith report at bugs.python.org
Thu Feb 27 10:31:58 EST 2020


hwgdb Smith <hwgdb123 at gmail.com> added the comment:

Using utf-8 doesn't display correctly on my mail client.
So i thought it might work using GBK, and I try to change the Content-Disposition filename using GBK.
And just now, I print the legacy Api MIMEMultipart.as_string(), I found it using utf-8 too. The difference is 
legacy api:  filename="=?utf-8?b?6LaFZeS/nTMwMDBQLmNzdg==?="   
EmailMessage: filename*=utf-8''.%2F%E8%B6%85e%E4%BF%9D3000P.csv

So it is not the encoding cause the display error. But I still don't know why? Base64?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39771>
_______________________________________


More information about the Python-bugs-list mailing list