I use imaplib for my project because I need to access gmails accounts. Fact: with gmail tags, each message can be on an arbitrary number of folders / fields / labels.
The problem is that I would like to get every single label from every single message.
The first solution I came up with is to use the All Mail folder to receive all messages, and then check for each message whether this message is included in each of the available folders.
However, I find this decision difficult, and I was wondering if there is a better way to do this.
Thanks!
source share