Admin Production ni-theme
Current Publication

InetPop3Open

LabWindows/CVI

InetPop3Open

int InetPop3Open (const char *server, const char *userName, const char *password, int *POP3Handle);

Purpose

Opens a connection to the specified POP3 server with the specified user name and password.

Note  POP3 servers may close the connection based on a custom idle timeout period. Therefore, National Instruments recommends that after opening the connection, you issue commands, retrieve messages, and so on, and then close the connection as soon as possible. If the POP3 server closes the connection, subsequent POP3 function calls will return kInetSocketError (System socket error).

Parameters

Input
Name Type Description
server const char * The name of the POP3 server.
userName const char * The user name to use when logging in to the POP3 server.
password const char * The password to use when logging in to the POP3 server.
Output
Name Type Description
POP3Handle int An integer handle identifying this connection to the POP3 server. Pass the address of an integer to get this handle. Discard this handle by calling the InetPop3Close function.

Return Value

Name Type Description
result int Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Additional Information

Library: Internet Library

Include file: cvintwrk.h

LabWindows/CVI compatibility: LabWindows/CVI 7.1 and later

Example

Refer to internet\pop3clnt\pop3clnt.cws for an example of using the InetPop3Open function.