Example: imap_list_mailboxes_ex

In the following example, the imap_list_mailboxes_ex function lists the messages and saves the message count to a variable.

    imap_list_mailboxes_ex(&imap1,"ListMailboxes",
            "Reference=#news.",
            "MatchName=comp.mail.*",
            LAST );