文件(https://docs.python.org/2/library/imaplib.html)说:
IMAP4.close()
Close currently selected mailbox. Deleted messages are removed from writable mailbox. This is the recommended command before LOGOUT.
我想遍历一个帐户的所有邮箱(先读后开)。
我是否只需要在注销前调用一次.close()?
还是每次打开另一个邮箱前都要打电话?在
根据rfc1730https://tools.ietf.org/html/rfc1730#section-6.4.2的IMAP'CLOSE'命令提到在每个邮箱上调用'CLOSE'更快,但不是必需的。在
Python的imaplib close()方法只将“close”请求传递给服务器,Python文档只需在RFC之后说“recommended”。在
相关问题 更多 >
编程相关推荐