Share this page

# imap_unsubscribe_ex

Internet Messaging Functions (IMAP)

Unsubscribes a mailbox for a specific IMAP session.

    int imap_unsubscribe_ex( IMAP *ppimap, char *transaction, char *mailbox, LAST );

ppimap | A session identifier.
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_unsubscribe_ex function unsubscribes the specified mailbox. The unsubscribe command removes the specified mailbox name from the server's set of "active" or "subscribed" mailboxes.

This function is for use with multiple sessions. For global sessions, use the imap_unsubscribe function, which leaves out the 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, imap_unsubscribe_ex unsubscribes from MyMailbox and MyMailbox/stuff.

Copy code

        imap_unsubscribe_ex(&imap1,"Unsubscribe",
            "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: