[issue39771] EmailMessage.add_header doesn't work

2020-02-28 Thread hwgdb Smith
hwgdb Smith added the comment: Sorry, the Gmail web is correctly. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue39771] EmailMessage.add_header doesn't work

2020-02-28 Thread hwgdb Smith
hwgdb Smith added the comment: And i just send a mail to my Gmail. I view it using web, it is incorrectly! -- ___ Python tracker ___ __

[issue39771] EmailMessage.add_header doesn't work

2020-02-28 Thread hwgdb Smith
hwgdb Smith added the comment: https://litmus.com/blog/infographic-the-2019-email-client-market-share And there is a survey about email client market share. You see outlook is top 3. -- ___ Python tracker _

[issue39771] EmailMessage.add_header doesn't work

2020-02-28 Thread hwgdb Smith
hwgdb Smith added the comment: I think program's goal is to solve problem, not solve the "standard". OK, if you insist that "standard" has the Top priority, could you please tell me a way to change the default behavior of the new api to use the "=?utf-8?b?" parameter style. Is there a functi

[issue39771] EmailMessage.add_header doesn't work

2020-02-28 Thread R. David Murray
R. David Murray added the comment: Since Outlook is one of the mailers that generates the non-RFC-compliant headers, it doesn't surprise me all that much that it can't interpret the RFC compliant headers correctly. I'm not sure there is anything we can do here. I suppose someone could do a

[issue39771] EmailMessage.add_header doesn't work

2020-02-27 Thread hwgdb Smith
hwgdb Smith added the comment: Microsoft outlook 2016 MSO(16.0.4266.10001) x64 -- Added file: https://bugs.python.org/file48925/outlook_screenshot.jpeg ___ Python tracker ___

[issue39771] EmailMessage.add_header doesn't work

2020-02-27 Thread hwgdb Smith
hwgdb Smith added the comment: Microsoft outlook 20116 MSO(16.0.4266.10001) x64 Foxmail 7.2 (build 7.026) I use these two email client. All display incorrectly. And I have uploaded the screenshot. -- Added file: https://bugs.python.org/file48924/foxmail_screenshot.jpeg _

[issue39771] EmailMessage.add_header doesn't work

2020-02-27 Thread R. David Murray
R. David Murray added the comment: The legacy API appears to be using an RFC-incorrect (but common) encoded-word encoding, while the new API is using the RFC-compliant MIME-parameter encoding (% encoding). Which email client are you using? -- ___

[issue39771] EmailMessage.add_header doesn't work

2020-02-27 Thread hwgdb Smith
hwgdb Smith added the comment: Why there are two different representations of the same file name? It displays incorrectly when use the EmailMessage API filename representation. -- ___ Python tracker __

[issue39771] EmailMessage.add_header doesn't work

2020-02-27 Thread hwgdb Smith
hwgdb Smith 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 differe

[issue39771] EmailMessage.add_header doesn't work

2020-02-27 Thread R. David Murray
R. David Murray added the comment: Actually, given that the contentmanager does accept a charset parameter for text content, it does seem reasonable to treat this as a bug. But as I said fixing it may not be trivial. -- ___ Python tracker

[issue39771] EmailMessage.add_header doesn't work

2020-02-27 Thread R. David Murray
R. David Murray added the comment: I think you are saying that you want the charset in the encoded filename to be GBK rather than utf-8? utf-8 should certainly display correctly in your email client, though, so if it is not there is something else going wrong. As far as the 3 tuple not wo

[issue39771] EmailMessage.add_header doesn't work

2020-02-27 Thread hwgdb Smith
hwgdb Smith added the comment: I have uploaded just now. Thank you. -- Added file: https://bugs.python.org/file48920/email bug.rar ___ Python tracker ___ _

[issue39771] EmailMessage.add_header doesn't work

2020-02-27 Thread Andrei Daraschenka
Andrei Daraschenka added the comment: Hello, could you please attach minimal-work file for reproduce it? -- nosy: +dorosch ___ Python tracker ___ _

[issue39771] EmailMessage.add_header doesn't work

2020-02-26 Thread hwgdb Smith
hwgdb Smith added the comment: "but msg.as_string() doesn't change. " , I mean using filename=file_name or filename=("GBK", "", f"{file_name}") or filename=("utf-8", "", f"{file_name}") msg.as_string() doesn't change. -- ___ Python tracke

[issue39771] EmailMessage.add_header doesn't work

2020-02-26 Thread hwgdb Smith
New submission from hwgdb Smith : here is the partial code: msg = EmailMessage() file_name = "超e保3000P.csv" ctype, encoding = mimetypes.guess_type(file_name) if ctype is None or encoding is not None: ctype = "application/octet-stream" maintype, subtype = ctype.split("/