Closed maya413 closed 4 years ago
补充一下:
Traceback (most recent call last):
File "D:/py/Service_popsmtp/getSerivce", line 66, in
File "D:\conda_env2\Service\lib\site-packages\zmail\server.py", line 194, in getheaders , _headers, *__ = parse_headers(mail_header) File "D:\conda_env2\Service\lib\site-packages\zmail\parser.py", line 201, in parse_headers value = parse_header_value(bvalue, ('utf-8',)) File "D:\conda_env2\Service\lib\site-packages\zmail\parser.py", line 74, in parse_header_value for _value, _charset in decode_header(value): File "D:\conda_env2\Service\lib\email\header.py", line 128, in decode_header raise HeaderParseError('Base64 decoding error') email.errors.HeaderParseError: Base64 decoding error
get_mails需要拿到所有邮件的头 所以会比较慢 报错是因为可能邮件中含有非法内容 看样子standard lib都解析失败了 估计是邮件非法的问题
好像是文件中转站的问题
---原始邮件--- 发件人: "ZhangYunHao"<notifications@github.com> 发送时间: 2019年12月14日(周六) 晚上10:34 收件人: "ZYunH/zmail"<zmail@noreply.github.com>; 抄送: "Author"<author@noreply.github.com>;"maya413"<247370033@qq.com>; 主题: Re: [ZYunH/zmail] get_mails 会卡住 (#83)
get_mails需要拿到所有邮件的头 所以会比较慢 报错是因为可能邮件中含有非法内容 看样子standard lib都解析失败了 估计是邮件非法的问题
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
server.get_mails(subject='carl',start_time='2019-12-1',sender='carl')
我细看了一下,是在getheader方法里面卡住。
另外我用的!@qq.com邮箱
最后出现错误 File "D:\conda_env2\Service\lib\email\base64mime.py", line 112, in decode return a2b_base64(string.encode('raw-unicode-escape')) binascii.Error: Incorrect padding