Catalyst Internet Mail .NET

InternetMail.Connect Method ()

Establish a connection with a remote host.

[Visual Basic]
Overloads Public Function Connect() As Boolean
[C#]
public bool Connect();

Return Value

A boolean value which specifies if the connection has been established. A return value of true indicates that the connection has completed and the application may exchange data with the mail server. If this method returns false, the connection could not be established and the application should check the value of the LastError property to determine the cause of the failure.

Remarks

This method establishes a connection using assigned property values.

The value of the ServerName will be used to determine the host name or address to connect to.

The value of the RemotePort property will be used to determine the port number to connect to.

The value of the Timeout property will be used to specify the timeout period.

The value of the Options property will be used to specify the default options for the connection.

See Also

InternetMail Class | SocketTools Namespace | InternetMail.Connect Overload List