System.Net.Mail.SmtpClient.Port Property

Gets or sets the port used for SMTP transactions.


public int Port { get; set; }


Documentation for this section has not yet been entered.


The value of the SmtpClient.Port property can also be set using constructors or the application or machine configuration file. For more information about using configuration files, see mailSettings for If information is specified using this property, this information overrides the configuration file settings.


Namespace: System.Net.Mail
Assembly: System (in System.dll)
Assembly Versions:,
Since: .NET 2.0