提交 31e83215 authored 作者: 刘擎阳's avatar 刘擎阳

1.附件优化

上级 8177b2ca
......@@ -136,7 +136,7 @@ class FetchmailServer(models.Model):
filename, encoding = decode_header(filename)[0]
if isinstance(filename, bytes):
filename = filename.decode(encoding if encoding else "utf-8")
attachment_arr.append((filename, part.get_payload(decode=True)))
attachment_arr.append((filename, part.get_payload(decode=True)))
for part in msg.walk():
# 如果ture的话内容是没用的
if not part.is_multipart():
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论