Closed jairuigou closed 10 months ago
check uids type I have checked it and all works.
for msg in mailbox.fetch(A(uid=['360'])):
print(msg.date, msg.uid)
If it is still not works - write your email server name
If it is still not works - write your email server name
Thanks for the reply!
I found that A(uid=['360'])
returns "(UID 360)". But "(UID 360)" dosen't work withimaplib.IMAP4.client.uid(commands....)
in my environment. And if I use "UID 360" without brackets like this:
for msg in mailbox.fetch("UID 360", limit=2):
print(msg.date, msg.uid)
It works fine. I am not very familiar with the usage of imaplib, and it seems that the UID criteria wrapped in parentheses does not work for me. My email server name is: "imap.exmail.qq.com"
Thanks, @jarugu I hope your experience will useful for people. What is you mail server?
from @Jarugu: imap.exmail.qq.com
I have tied the keyword_criteria example:
but its result is same as mailbox.fetch().It appears that it doesn't filter based on the uids list and still returns all of my emails.
python version i used: 3.11.6 imap_tools version: 1.5.0