imap_fetch

Example: imap_fetchInternet Messaging Functions (IMAP)

Retrieves data associated with mailbox messages.

int imap_fetch( char *transaction, char *mode, char *message, ENDITEM, LAST );
transaction A transaction name for this step in quotes. To avoid creating a transaction for this step, use a null string, "".
mode The fetch mode in the following format:
"Mode=mode"
message The messages whose data you want to fetch and the data. The data can be any information associated with the message, such as UID, FLAGS, RFC822.SIZE, RFC822.HEADER, etc. "Fetch=begin_msg:end_msg (data)"
ENDITEM A marker indicating the end of the data item list. Repeat the option and ENDITEM arguments for each set of data that you fetch.
LAST A marker indicating the end of the argument list.

The imap_fetch function retrieves data associated with mailbox messages, for a specific session. You can request the value of any message data including flags, headers, and message IDs.

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