我想解析来自用户收件箱的一些电子邮件,但是当我这样做时:
I want to parse some emails from a user 's inbox but when I do:
typ, msg_data = imap_conn.fetch(uid, '(RFC822)')
它将电子邮件标记为已读或已读.这不是所需的功能.你知道我怎样才能让电子邮件保持以前的凝视状态,要么看到要么没看到?
It marks the email as SEEN or read. This is not the desired functionality. Do you know how can I keep the email at its previous stare either SEEN or NOT SEEN?
您也可以在选择文件夹时将 read_only
设置为 true:
You might also set read_only
to true when selecting the folder:
imap_conn.select('Inbox', readonly=True)
这篇关于使用 imaplib 获取电子邮件,但不要将其标记为 SEEN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!