Unlike a file folder, in which the folder's contents are always available, access to an IMAP folder requires an active network connection to the IMAP server. This adds an additional layer of complexity to the mail-reading process, which is reflected in the connection state of an IMAP folder.
An IMAP folder can be in one of two states: online, meaning that there is an established network connection between IMAIL and the IMAP server, and offline when there is not. IMAIL is, at present, a very simple IMAP mail reader: it must be online to read and manipulate mail messages. Mail readers that have this property are said to operate in online mode.1 Do not confuse the online state with online mode. When we refer to online or offline in this document, it always means the corresponding state.
When an IMAP folder is selected in an IMAIL buffer, the modeline for that buffer shows either `online' or `offline' to indicate the folder's connection state. Normally, an IMAP folder goes online when it is first selected, and stays online indefinitely until it is explicitly disconnected.2 Commands that break the connection are explicitly pointed out in their descriptions below; most other commands will force an IMAP folder into the online state if it is offline.
 IMAP also supports two other modes of operation, called offline mode and disconnected mode; at present IMAIL can not operate in these alternate modes.
 Although IMAP servers are allowed to disconnect mail readers that are inactive for long periods of time, IMAIL silently keeps the connection open by periodically transmitting commands to the server.