WebSmtpCommand Function

Action

Sends a command string to an SMTP server.

Include file

WebAPI.bdh

Syntax

WebSmtpCommand( in hSmtp    : number,
                in sCommand : string ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hSmtp Handle to a Web connection that was created by WebSmtpConnect
sCommand Command string

Example

dcltrans
  transaction TWebSmtpCommand
  const
    COMMAND := "...\r\n"; // specify command string
  var
   hSmtp: number;
  begin
   WebSmtpConnect(hSmtp, "standardhost", WEB_PORT_SMTP);
   WebSmtpHello(hSmtp, "<MyDomain>");
   WebSmtpReset(hSmtp);   WebSmtpCommand(hSmtp, COMMAND);
   WebSmtpQuit(hSmtp);
   WebSmtpShutdown(hSmtp);
 end TWebSmtpCommand;