Python exchangelib检索已发送的主题行

时间:2017-06-07 14:53:41

标签: python python-3.x

我正在尝试通过exchangelib MS365并检索我发送的文件夹主题行。以下代码可与account.inbox轻松配合使用,但不适用于account.sent。 任何想法:

from exchangelib import DELEGATE, Account, Credentials

creds = Credentials(username='XXXXXXXXXXXXXXX'
                    , password='XXXXXXXXXXX')

account = Account(
    primary_smtp_address='XXXXXXXXXXXX',
    credentials=creds, 
    autodiscover=True, 
    access_type=DELEGATE)

#for item in account.sent.all()[:5]:
#        print(item.subject)


z = account.sent.all()
print([t for t in z[:5]])

0 个答案:

没有答案