Common Examples

Fetch the latest message:
UID FETCH * (FLAGS)
This retrieves the flags for the message with the highest UID in the mailbox.Fetch a range from a specific UID to the end:
UID FETCH 100:* (BODY[HEADER])
This retrieves headers for all messages starting from UID 100 up to the newest message.Search for everything:
UID SEARCH 1:*
This returns the UIDs for every message in the current mailbox, from the first to the last
same
(BODY[])

