WebSmtpSendData Function

Action

Sends a data string to an SMTP server.

Include file

WebAPI.bdh

Syntax

WebSmtpSendData( in hSmtp : number,
                 in sData : string ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hSmtp Handle to a Web connection that was created by WebSmtpConnect
sData Data string

Example

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

SilkEssential sample

eMail.sep