mhammond / pywin32

Python for Windows (pywin32) Extensions
5.01k stars 793 forks source link

System administrator has limited the number of items error #2092

Closed inkyguy closed 1 year ago

inkyguy commented 1 year ago

I'm using win32com module in python to perform actions such as draft email, change subject, move email items to other sub folders, and also read email details within date range etc.

i am first storing all the EntryIDs of emails filtered by date range, and then we are looping over those entry ids, performing actions such as reading body, changing subject or category, move email (these are all individual small functions)

Intermittently I'm facing below error: -2147352567, 'Exception occurred.', (4096, 'Microsoft Outlook', 'Your server administrator has limited the number of items you can open simultaneously. Try closing messages you have opened or removing attachments and images from unsent messages you are composing.', None, 0, -2147221219), None)"

Could you please help me resolve this issue.

I also tried using os.taskkill command after every 10 loops, but still I'm facing this issue.

mhammond commented 1 year ago

See https://github.com/mhammond/pywin32#support

inkyguy commented 1 year ago

@mhammond I have subscribed and dropped an email to the mailing list, awaiting a response. Thank you.