Connects to an SMTP server.
WebAPI.bdh
WebSmtpConnect( out hSmtp : number, in sHost : string, in nPort : number, in nSecurity : number optional ): boolean;
true if the connection could be established and the server sent a response message
false otherwise
Parameter | Description |
---|---|
hSmtp |
Variable receiving a handle to the Web connection If this parameter contains a handle to a Web connection prior to the WebSmtpConnect 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 | Address of the SMTP server |
nPort | Port to connect at the SMTP server. The standard port is WEB_PORT_SMTP (25) |
nSecurity |
Specifies whether to establish a secure connection to the remote server (optional). Possible options are:
|
dcltrans transaction TWebSmtp var hSmtp: number; begin WebSmtpConnect(hSmtp, "standardhost", WEB_PORT_SMTP); WebSmtpHello(hSmtp, "<MyDomain>"); WebSmtpQuit(hSmtp); WebSmtpShutdown(hSmtp); end TWebSmtp;
WebMulti01.bdf
eMail.sep