Gets or sets the client domain name used in the initial SMTP protocol request to connect to an SMTP mail server.
Assembly: System (in System.dll)
The property allows an application to change the client domain name used in the initial SMTP protocol request to an SMTP server. If the property is not set, the default is to use the localhost name of the local computer sending the request.
RFC 2821 that defines the details of the Simple Mail Transport Protocol (SMTP). This RFC stipulates that an SMTP client should use a fully-qualified domain name as part of its HELO or Extended HELO (EHLO) message to a server.
The property allows an application to change the client domain name (the RFC uses the term Domain in the protocol description) to use the fully-qualified domain name of the local machine, rather than the localhost name that is used by default. This provides greater compliance with the SMTP protocol standards. However, the fully-qualified domain name may expose private information about the local computer.
Any name set in the property should conform to DNS rules for 7-bit ASCII names.
The default value for this network element in the SMTP configuration file can also be changed by manually editing the machine or application configuration files directly.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.