Internet Messaging Functions (IMAP) > Alphabetical List of Functions > imap_select

imap_select

Example: imap_select Internet Messaging Functions (IMAP)

Selects a mailbox.

int imap_select( char *transaction, char *mailbox, LAST );
transaction A transaction name for this step in quotes. To avoid creating a transaction for this step, use a null string, "".
mailbox The name of a mailbox in the following format:"MAILBOX=mailbox_name"
LAST A marker indicating the end of the argument list.

The imap_select function selects a mailbox to access its messages. Calling this function modifies the mailbox state (the number of messages unread, total number of messages, etc.). To retrieve the mailbox properties, call imap_get_attribute_int.

This function is for use with global sessions. For multiple sessions, use the imap_select_ex function, which allows you to specify a session identifier.

Return Values

If this function succeeds, it returns LR_PASS. Otherwise, it returns LR_FAIL.

Parameterization

All arguments of this function of the type char, can be parameterized with standard parameterization.