I am using exchangelib to extract all the mail details (like subject, in_reply_to, received time etc.,) . I need to extract the owner and members who has access to the mail box. When I tried to run: account.delegates
it is failing with None type object is not iterable
Can exhangelib extract mailbox's owner and member detail, if not is there any python module which can be used to achieve the goal?
Stack trace:
TypeError Traceback (most recent call last)
<ipython-input-5-e6c725567a6c> in <module>
----> 1 account.delegates
~\AppData\Roaming\Python\Python37\site-packages\exchangelib\account.py in delegates(self)
628 """Returns a list of DelegateUser objects representing the delegates that are set on this account
629 """
--> 630 return list(GetDelegate(account=self).call(user_ids=None, include_permissions=True))
631
632 def __str__(self):
~\AppData\Roaming\Python\Python37\site-packages\exchangelib\services\get_delegate.py in call(self, user_ids, include_permissions)
21 **dict(
22 mailbox=DLMailbox(email_address=self.account.primary_smtp_address),
---> 23 include_permissions=include_permissions,
24 )
25 ):
~\AppData\Roaming\Python\Python37\site-packages\exchangelib\services\common.py in _pool_requests(self, payload_func, items, **kwargs)
510 results = []
511 n = 0
--> 512 for chunk in chunkify(items, self.chunk_size):
513 n += 1
514 log.debug('Starting %s._get_elements worker %s for %s items', self.__class__.__name__, n, len(chunk))
~\AppData\Roaming\Python\Python37\site-packages\exchangelib\util.py in chunkify(iterable, chunksize)
107 # generator, set, map, QuerySet
108 chunk = []
--> 109 for i in iterable:
110 chunk.append(i)
111 if len(chunk) == chunksize:
TypeError: 'NoneType' object is not iterable