Replies: 1 comment 3 replies
-
Which version of exchangelib is this? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to iterate through all mails in specified mail box folder and do some operation on the same.
pathToFolder = account.root/ pathtospecifedfolder
msgs = pathToFolder.all()
and to count the number of mails present in the folder, I am using a for loop as follows,
c = 0
for i in msgs:
c = c +1
This loop is giving me a correct count of number of mails present in the mailbox i.e 150.
Though while iterating again for processing each mail, it is extracting only 100 mails without any warning or error and execution stops after 100 mails (without any error msg).
for item in msgs.iterator():
do some operation on item
I found out the default chunk_size value is 100, so I changed it to 300 manually from file "services/common.py".
then all mails present in mail box i.e. 150 got processed but I am getting an warning as
"chunk size 300 is dangerously high, ResolveNames supports returning at most 100 candidates for a lookup"
I also tried changing this for loop as,
for c in chunkify (msgs.iterator(),10):
for item in c:
do some operation on item
still only 100 mails got extracted
I am new to this, can someone please help me resolve this issue and extract all mails present in the folder without any warning.
Beta Was this translation helpful? Give feedback.
All reactions