To assist in usability of the Imap component, the following table lists the most common IMAP commands and how to execute these commands using the Imap component.
| Command | Purpose | PowerTCP Equivalent |
|---|---|---|
| APPEND | Appends a new message to the end of a mailbox. |
Add, ImapMessageCollection.BeginAdd |
| CAPABILITY | Requests a listing of capabilities that the server supports. |
Performed automatically upon login. capabilities list is accessible by Imap.Capabilities. |
| COPY | Copies one or more messages to the end of the specified mailbox. |
Copy, MailBox.BeginCopy (to copy multiple messages) --or-- ImapMessage.Copy, ImapMessage.BeginCopy (to copy a single message) |
| CREATE | Creates a mailbox with the given name. |
Add, MailboxCollection.BeginAdd |
| DELETE | Permanently removes the mailbox with the given name. |
Remove, BeginRemove, MailBox.Delete, Mailbox.BeginDelete |
| EXAMINE | Selects a mailbox with read-only access. |
Examine. Also occurs automatically when you access any Mailbox that has Selectable = false. |
| EXPUNGE | Permanently removes all messages with the Deleted flag set. |
Purge, Mailbox.BeginPurge |
| FETCH | Retrieves data associated with a message. |
Get, MailBox.BeginGet (to get multiple messages in a mailbox) --or-- ImapMessage.Get, BeginGet (to get a single message) |
| LIST | Returns a subset of names. |
List. Also occurs automatically after logging in if AutoList is true. In addition, "refresh" methods such as Refresh and MailboxCollection.BeginRefreshalso send LIST. Finally, a LIST is sent whenever the MailBox.MailBoxescollection is accessed for the first time. |
| LOGIN | Identifies the client to the server. |
Imap.Login |
| LOGOUT | Informs the server that the client is done. |
Imap.Logout |
| NOOP | Used as a periodic poll or to reset an inactivity timer. |
Noop, Imap.BeginNoop |
| RENAME | Changes the name of a mailbox. |
Setting either the MailBox.Name or FullName properties. |
| SEARCH | Searches a mailbox for messages which meet a certain criteria. |
Search, Mailbox.BeginSearch |
| SELECT | Selects a mailbox so the messages within can be accessed. |
This is done by any action that accesses an ImapMessageCollection. |
| STORE | Modifies message data in a mailbox. |
Set, BeginSet. Also by setting any flag-based property of the Mailbox object, such as Mailbox.Marked |
| SUBSCRIBE | Adds the mailbox to the server's set of subscribed mailboxes. |
Subscribe, Mailbox.BeginSubscribe |
| UNSUBSCRIBE | Removes the mailbox from the server's set of subscribed mailboxes. |
Unsubscribe, Mailbox.BeginUnsubscribe |