zhangyunhao116 / zmail

Zmail makes it easier to send and retrieve emails in python3
MIT License
433 stars 112 forks source link

get_mails 会卡住 #83

Closed maya413 closed 4 years ago

maya413 commented 4 years ago

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

maya413 commented 4 years ago

补充一下: Traceback (most recent call last): File "D:/py/Service_popsmtp/getSerivce", line 66, in File "D:/py/Service_popsmtp/getSerivce", line 53, in checkEmail

lsmail = server.get_mails(subject='carl',start_time='2019-12-1',sender='carl')

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

zhangyunhao116 commented 4 years ago

get_mails需要拿到所有邮件的头 所以会比较慢 报错是因为可能邮件中含有非法内容 看样子standard lib都解析失败了 估计是邮件非法的问题

maya413 commented 4 years ago

好像是文件中转站的问题

---原始邮件--- 发件人: "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.