I'm using Imap_tools library and I'm trying to fetch the emails in a folder 10 by 10 (for pagination and performance purposes) when I tried using limit and passing a tuple to it like so:
mails = mailbox.fetch(reverse = True, headers_only = True, mark_seen=False, limit=(10,20))
I got the following error
File "C:\Python39\lib\site-packages\imap_tools\mailbox.py", line 147, in fetch
assert type(limit_range) is slice
AssertionError
Is there anyone who has a solution or a better approach? I will be thankful!
Expected it to ignore the 1st 10 Emails and fetch the second 10 Emails!