SmtpNetworkSettings Class [IIS 7 and higher]
Configures Simple Mail Transfer Protocol (SMTP) network settings.
The following table lists the properties exposed by the SmtpNetworkSettings class.
A read/write boolean value. true if default user credentials are used to access an SMTP server; otherwise, false. The default is false.
A read/write string value that specifies the name of the SMTP server.
A read/write string value that specifies the user password with which to connect to an SMTP server.
The DefaultCredentials property takes precedence over the UserName and Password properties. The UserName and Password properties are used only if DefaultCredentials is set to false.
A read/write sint32 value that specifies the port that SMTP clients use to connect to an SMTP server. The default is 25.
A read/write string value that specifies the user name with which to connect to an SMTP server.
Instances of this class are contained in the Network property of the SmtpMailSettingsSection class.