Share this page

# imap_search_ex

Example: imap_search_ex | Internet Messaging Functions (IMAP)

Searches for messages that match the search criteria, for a specific session.

    int imap_search_ex( IMAP *ppimap, char *transaction, char *key, char *param, ENDITEM, 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, "".
key | The Search Keys, in the following format: `"`Search=criteria`".` Note that the search is not case-sensitive.
param | A parameter in which to store the search results. Use the following format: `"SaveTo=`param1 (data)`"`
ENDITEM | A marker indicating the end of the data item list. Repeat the criteria, param, and ENDITEM arguments for each set of data that you fetch.
LAST | A marker indicating the end of the argument list.

The imap_search_ex function searches the mailbox for messages that match the search criteria. Search criteria may consist of one or more Search Keys.

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

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