Hi guys - concerning Gmail labels - what are they technically speaking. I mean through imap connection I can access a gmail mailbox and go through the emails however let say I wish to create a label and attach it to the emails as I loop through them using code - how can I do that in code? I'm using php - and Zend Framework.
EDIT ===
Thanks for the replies so its now clear that labels are treated like folders in this respect however I've tried the Zend_Mail_Storage_Imap class functions with interesting results. If I try the Zend_Mail_Storage_Imap:moveMessage function - it removes the message from wherever it is and literally attaches a label to it meaning if I wish to attach a label foo to my message it removes it form the inbox and attaches the label foo. However if I use Zend_Mail_Storage_Imap::copyMessage that does the trick.
However I'm wondering here that doesn't this literally make a duplicate copy of the message and you end up with more than one duplicate message right here?
Also what if I need to select all the messages that are attached with a certain label or in this case within a certain folder?