WebPopConnect Function

Action

Connects to a POP3 server.

Include file

WebAPI.bdh

Syntax

WebPopConnect( out hPop    : number, 
               in sHost    : string, 
               in nPort    : number, 
               in nSecure  : number optional ): boolean;

Return value

  • true if the response was successfully received and the server confirmed with "+OK"

  • false otherwise

Parameter Description
hPop

Variable receiving a handle to the Web connection

If this parameter contains a handle to a Web connection prior to the WebPopConnect function call, the memory allocated with the handle is released. Whenever you want to create a new Web connection, make sure this variable is initialized with 0 (this is automatically done within transactions when they are executed for the first time, but not within functions)

sHost Domain name or IP address of the POP3 server, for example, hostname.com or 192.231.34.1
nPort Port to connect to, usually WEB_PORT_POP3
nSecurity

Specifies whether to establish a secure connection to the remote server (optional). Possible options are:

  • WEB_CONNECT_NONE. Establishes an insecure connection to the server (default)

  • WEB_CONNECT_SSL. Establishes a secure connection using SSL

Example

dcltrans 
  transaction TWebPop3 
  var
    hPop: number; 
  begin 
    WebPopConnect(hPop, "standardhost", WEB_PORT_POP3);
    WebPopShutdown(hPop); 
  end TWebPop3;

Sample scripts

WebMulti01.bdf, WebSecure01.bdf

SilkEssential sample

eMail.sep