Connects to the SMTP server with the specified security. Uses port 25 for no SSL, 587 for explicit SSL and 465 for implicit SSL.

Namespace:  Rebex.Net
Assembly:  Rebex.Smtp (in Rebex.Smtp.dll)

Syntax

Visual Basic
Public Function Connect ( _
	serverName As String, _
	security As SslMode _
) As String
C#
public string Connect(
	string serverName,
	SslMode security
)

Parameters

serverName
Type: System..::..String
The server address - either a hostname or a dotted string IP address.
security
Type: Rebex.Net..::..SslMode
Connection security.

Return Value

The welcome message returned by the server.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also