is it possible to read out the body of an email that is in a subfolder of the inbox using exchangelib? If yes, how can I achieve that? I only know that I can get the body of an email which is in the inbox using the following code:
for item in account.inbox.all().order_by('-datetime_received')[:1]:
print(item.body)
Yes, that's possible. See the folder navigation options described in https://github.com/ecederstrand/exchangelib#folders
Here's an example:
sub_sub_folder = account.inbox / 'Some' / 'Subfolder'
for item in sub_sub_folder.all().order_by('-datetime_received')[:1]:
print(item.body)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.