Share this page

# imap_subscribe

Internet Messaging Functions (IMAP)

Subscribes to a mailbox.

    int imap_subscribe( 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_subscribe function sets the specified mailbox to subscribed or active. To retrieve a list of the mailboxes that have subscriptions, call imap_list_subscriptions.

This function is for use with global sessions. For multiple sessions, use the imap_subscribe_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.

## Example

In the following example, the imap_subscribe function subscribes to the MyMailbox mailbox.

Copy code

        imap_subscribe("Subscribe",
            "Mailbox=MyMailbox",
            "Mailbox=MyMailbox/stuff",
            LAST );

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: