Post Office Protocol Vuser Functions (POP3) > Alphabetical List of Functions > pop3_retrieve

pop3_retrieve

Example: pop3_retrieve Post Office Protocol Vuser Functions (POP3)

Retrieves messages from the POP3 server.

long pop3_retrieve( char *transaction, char *retrieveList, [<Options>,] LAST );
transaction A transaction name for this step in quotes. To instruct VuGen not to create a transaction for this step, use a NULL string, "".
retrieveList The messages to retrieve. Use the following format: "RetrieveList=message1,message2,message3...", where each message is a 1-based index of the message in the list.
To retrieve all messages, use "RetrieveList=All"
<Options> The following options are available:CreateParamForHeader: Create parameter to hold the values of headers. The value of the argument is a comma separated list of header names. The name of the parameter will have the following format: pop3_header_<HeaderName>_<MessageID>
The header name is case sensitive.DeleteMail: If set to "yes" (default), it instructs the server to delete the messages from the server after they are retrieved. Use the following format:
"DeleteMail=yes/no".
ShowMail: If set to "yes", the messages will be displayed in the execution log. Default is "no". Use the format:
"ShowMail=yes/no"
SaveTo: Saves the data returned by the server to a parameter. Use the format:
"SaveTo=ParameterName"
SaveAs: Saves the retrieved messages to a file. Use the format:
"SaveAs=filename"
LAST A marker indicating the end of the argument list.

The pop3_retrieve function retrieves messages from the POP3 server. You can specify a range or all of the messages. By default, it deletes the messages from the server after they are retrieved.

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

The following argument(s) can be parameterized with standard parameterization: retrieveList, deleteFlag