Search code examples
pythonimaplib

Newly created folder with imaplib is hidden. How can I unhide it?


I am using

strCreateYN, strCreateResponse = mail.create('INBOX.Foldername')

to create a folder. The folder gets created and I can move messages to it. For some reason, the folder is hidden, and I have to go to the webmail client to unhide it.

Is there a way to change it to visible?


Solution

  • You may want to follow up any create with a subscribe command, which some clients use to show "interesting" folders.

    mail.subscribe('INBOX.Foldername')