SmtpNetworkElement.Port Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets the port that SMTP clients use to connect to an SMTP mail server. The default value is 25.

Namespace:   System.Net.Configuration
Assembly:  System (in System.dll)

<ConfigurationPropertyAttribute("port", DefaultValue := 25)>
Public Property Port As Integer

Property Value

Type: System.Int32

A string that represents the port to connect to an SMTP mail server.

.NET Framework
Available since 2.0
Return to top