首页 > 技术文章 > imaplib.error: command: SEARCH => got more than 10000 bytes

drgcaosheng 2017-11-08 13:56 原文

imaplib.error: command: SEARCH => got more than 10000 bytes

使用IMAPLIB进行标记邮件状态的时候,在

typ,data=M.search(None,"UNSEEN")

有出现上面的报错。

但是少量的邮件并没有该报错,是由于邮件数过多导致

利用下面导入imaplib的时候修改一下maxline就可以了

import imaplib
imaplib._MAXLINE = 200000

 

推荐阅读