According to this thread (and various hints in the source code like variable names) Indy supports fetching gmail labels but not setting or removing them. However, as of yet, this functionality appears to be undocumented. Can anyone help me with filling in the details about how to retrieve Gmail labels with Imap?
Which function(s) should I call to retrieve the labels and have Indy parse out the results for me? Although I could certainly manually call SendCmd() to request the labels ('C2 UID FETCH 92 (X-GM-LABELS)') similar to how I'm manually setting/removing labels (which Indy doesn't yet do), parsing FETCH results is something that I know is already built into Indy, so I don't want to re-invent the wheel here to decode the FETCH results. For now, to keep things simple, presume I just want the labels and not other envelopes/headers/message parts.
There do appear to be quite a few functions that might (or might not) be relevant, but with so many to choose from, and so many of them only having auto-generated documentation, figuring out which one to try, and which property (or sub-property) or function to find the actual labels is a little daunting. Can anyone point me in the right direction here?