Smtp.Connect Method
Namespace: Rebex.Net
Assembly: Rebex.Smtp.dll (version 7.0.9313)
Connect(String)
Connects to the SMTP server.
Declaration
public string Connect(string serverName)
Parameters
| Type | Name | Description |
|---|---|---|
| String | serverName | The server address - either a hostname or a dotted string address. |
Returns
| Type | Description |
|---|---|
| String | Welcome message returned by the server. |
Connect(String, Int32)
Connects to the SMTP server.
Declaration
public string Connect(string serverName, int serverPort)
Parameters
| Type | Name | Description |
|---|---|---|
| String | serverName | The server address - either a hostname or a dotted string address. |
| Int32 | serverPort | The server port (e.g. 25). |
Returns
| Type | Description |
|---|---|
| String | The welcome message returned by the server. |
Connect(String, Int32, SslMode)
Connects to the SMTP server with the specified security.
Declaration
public string Connect(string serverName, int serverPort, SslMode security)
Parameters
| Type | Name | Description |
|---|---|---|
| String | serverName | The server address - either a hostname or a dotted string IP address. |
| Int32 | serverPort | The server port (e.g. 25). |
| SslMode | security | Connection security. |
Returns
| Type | Description |
|---|---|
| String | The welcome message returned by the server. |
Connect(String, SslMode)
Connects to the SMTP server with the specified security. Uses port 25 for no SSL, 587 for explicit SSL and 465 for implicit SSL.
Declaration
public string Connect(string serverName, SslMode security)
Parameters
| Type | Name | Description |
|---|---|---|
| String | serverName | The server address - either a hostname or a dotted string IP address. |
| SslMode | security | Connection security. |
Returns
| Type | Description |
|---|---|
| String | The welcome message returned by the server. |