已经给 mailgun 提工单的,不知道大家遇到过这个问题没有…有没有比较好的解决方案。
1
ninja911 2019-04-20 23:36:23 +08:00
我猜你是发给腾讯 QQ 邮箱的吧。不是 Mailgun 的问题。是腾讯的问题。
当你的单个附件文件名超过 6 个字时(不管中文还是英文),可以尝试附件名称命名 ``` $newName = '=?UTF-8?B?'. base64_encode($attachFileName) . '?='; ``` 反正我是这样解决的。 |
2
aneureka OP @ninja911 不是的,好像发给所有邮箱都这样…可能是 content-type 的问题吧。。
|
3
aneureka OP 这个是 Mailgun 给我的回复,貌似他们也遇过这问题然后解决不了…
Hello xxx, Thank you for the update and clarification! I first came across this issue a couple of years ago, and unfortunately, I still have not been able to find a solution with Python. The issue stems from how Python attempts to handle Unicode and byte strings. Python has been the only language I've struggled with this matter. The only solution would be to use the ASCII equivalent of the filename and submit the data with the POST request. Reference: https://stackoverflow.com/questions/20591599/why-arent-post-names-with-unicode-sent-correctly-when-using-multipart-form-data I apologize for any inconvenience this may cause. Let us know if you have any questions. Thank you, Marco@MG |