This section contains a list of terms commonly used in the IMAP specification as well as in this manual and documentation.
Glossary
Mailbox
Mailbox is just IMAP-terminology for folder.
IMAP servers will often maintain multiple mailboxes (such as Inbox, Drafts, Sent, etc.) and often allow clients to create, rename, and/or delete mailboxes, and copy messages between them.
UID (Unique Identifier)
A 32-bit value assigned to each message by the IMAP server, that uniquely identifies the message within the mailbox it is located in.
The important thing to remember is that a UID is only unique within a particular mailbox; Every mailbox has its own set of UIDs. So in order to uniquely identify a mail message you need to know it's UID as well as the name of the mailbox in which the message is stored.