Skip to content

exchangelib.errors.ErrorFolderNotFound: No subfolder with name 'SUBFOLDER NAME' #1286

Closed Answered by Tre-Seibert
Tre-Seibert asked this question in Q&A
Discussion options

You must be logged in to vote

This issue is related to #1273 . A temporary workaround to this issue can be used as follows until a exchangelib update is released to address this issue:

fav_folder = None
inbox_folders = FolderCollection(account=account, folders=[account.inbox])
for folder in inbox_folders.find_folders(depth="Shallow"):
    if folder.name == "MyFavouriteSubFolder":
        fav_folder = folder
        
for mail in fav_folder.all().only("subject", "sender", "datetime_received"):
    print(mail.sender.email_address)

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Tre-Seibert
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Tre-Seibert
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Tre-Seibert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants