Share this page

# pop3_command_ex

Post Office Protocol Vuser Functions (POP3)

Sends a command to the POP3 server for a specific session.

    long pop3_command_ex ( POP3 *pppop3, char *transaction, char *command,
    [char *command, char* LocalAddr, char* STARTTLS,] LAST );

pppop3 | A session identifier.
transaction | A transaction name for this step in quotes. To instruct VuGen not to create a transaction for this step, use a NULL string, "".
command | One or more commands to send to the server in the following format:`"`Command=command1`", "`Command=command2`"...`
LocalAddr | Optional: Sets the preferred IP address of the client <ip_addr>[:<port>]. This option is useful for IP spoofing. Use the following format: "LocalAddr=199.123.123.123"
STARTTLS | Optional: Indicates that POP3's StartTLS (Start Transport Layer Security) extension must be activated on the session. If the parameter is set, then POP3 protocol's 'STARTTLS' command will be issued on the session during logon and connection will be switched to TLS mode. Use the following format : "STARTTLS"
LAST | A marker indicating the end of the argument list.

The pop3_command_ex function sends a command to the POP3 server for a specific session. The server returns the result of the command. For example, if you send the command "UIDL 1", the server returns the unique ID of the first message.

The pop3_command_ex function cannot handle multi-line server responses. For example, it cannot handle the responses to UIDL, RETR, or LIST commands.

This function is for use with multiple sessions. For global sessions, use the pop3_command function, which leaves out the 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: command

## Example

In the following example, the pop3_command_ex function returns the unique ID of the first message.

    ...

    // Logon to the POP3 server

    pop3_logon_ex(&pppop3, "Login",
                    "URL=pop3://user4t:my_pwd@techno.merc-int.com",
                    LAST );

    // Send a "UIDL 1" command to the server

    pop3_command_ex(&pppop3, "UID_Command",
                    "Command=UIDL 1",
                    LAST );

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