Internet Direct (Indy)
Home
PreviousUpNext
TIdSMTP.Connect Method

Opens a connection to the SMTP server.

Pascal
procedure Connect; override;
Parameters 
Description 
ATimeout 
Connection timeout in milliseconds. Default value is IdTimeoutDefault

Connect is a procedure that opens a connection to the SMTP server using the Host and Port properties. An exception will be raised if the connection fails or returns an invalid SMTP response code. 

After establishing the socket connection, Connect will clear the Capabilites from the SMTP server. 

Connect hails the server using either the HeloName or the LocalName properties using either the HELO command or the SMTP EHLO command when UseEHLO is True. 

When the EHLO command is supported on the SMTP server, Connect populates Capabilities using features indicated in the values returned in the server response. 

If an exception is raised in Connect, the SMTP client will call Disconnect and the exception will be re-raised. 

Use Disconnect to close the connection to the SMTP server.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.