-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use uids in fetch #202
Comments
move signature: Your mailbox may not support move by uid Note that uid may return None (rare) |
Sorry, I should have been more thorough. The issue is similar to issue 133. My inbox has 100 unseen emails and the loop throws an exception when it is trying to fetch the 51st email. I could copy emails in fetch iterations and delete them after the iteration. The problem is that someone may move an email manually from the UI while the script is running. That's why, i was wondering if the fetch method should use the uids method instead of the numbers method. |
As I sad at 133: Collect needed uids and call move once. Show me how are you using numbers method. |
I am referring to the implementation of the fetch method. It finds all the emails that meet the criteria using the numbers method. |
message_parts = "(BODY{}[{}] UID FLAGS RFC822.SIZE)".format( ... fetch already can search by uids with uid search criteria: What exactly do you propose to do and how will it help? |
? |
Yes, this is exactly what i had in mind. |
Needs to read RFC here, i will think about it. And I hope you will help me with it. |
I'd be glad to help you. |
How do you offer to fetch message data without message number by uid at _fetch_in_bulk and _fetch_by_one?
|
|
time results:
|
@dimitrisstr please check it at your task |
Added |
Maybe fetch should use uids instead of numbers. The following piece of code throws this exception
imap_tools.errors.MailboxFetchError: Response status "OK" expected, but "NO" received. Data: [b'The specified message set is invalid.']
The text was updated successfully, but these errors were encountered: