WebPopApop Function

Action

POP3 server login using MD5 message digest authentication. In response, in the banner greeting (during WebPopConnect) the server sends a timestamp that is stored internally for use with WebPopApop. The concatenated string of timestamp and password is then encrypted and sent to the server.

Include file

WebAPI.bdh

Syntax

WebPopApop( in hPop  : number, 
            in sName : string, 
            in sPass : string ): boolean;

Return value

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

  • false otherwise

Parameter Description
hPop Handle to a Web connection that was created by WebPopConnect
sName User name
sPass Password

Example

dcltrans 
  transaction TWebPop3 
  const
    USERNAME := "username";
    PASSWORD := "password";
  var
    hPop, nMessages, nSize: number; 
  begin
    WebPopConnect(hPop, "standardhost", WEB_PORT_POP3);
     
    // try to log in using secure MD5 encryption 
    if not WebPopApop(hPop, USERNAME, PASSWORD) then

    // if APOP fails, try normal user/pass sequence 
      if not WebPopUser(hPop, USERNAME) or 
          not WebPopPass(hPop, PASSWORD) then
        WebPopShutdown(hPop); 
        return 1; 
      end; 
    end;

    WebPopQuit(hPop);
    WebPopShutdown(hPop);
  end TWebPop3;

SilkEssential sample

eMail.sep