WebSmtpShutdown Function

Action

Closes the connection to the mail server.

Include file

WebAPI.bdh

Syntax

WebSmtpShutdown( inout hSmtp : number,
                 in    nMode : number optional): boolean;

Return value

  • true if the connection could be closed successfully

  • false otherwise

Parameter Description
hSmtp Handle to a Web connection that was created by WebSmtpConnect
nMode

Determines the shutdown mode (optional). Any of the following options is possible:

  • WEB_SHUTDOWN_GRACEFUL. Initiates a graceful shutdown: first closes and then resets the connection

  • WEB_SHUTDOWN_IMMEDIATE. Initiates a standard connection close (default)

  • WEB_SHUTDOWN_RESET. Resets the connection

Example

dcltrans
  transaction TWebSmtp
  var 
   hSmtp: number;
  begin
    WebSmtpConnect(hSmtp, "standardhost", WEB_PORT_SMTP);
    WebSmtpHello(hSmtp, "<MyDomain>");
    WebSmtpQuit(hSmtp);
    WebSmtpShutdown(hSmtp);
  end TWebSmtp;

Sample scripts

WebMulti01.bdf

SilkEssential sample

eMail.sep