Επεξεργασία

Κοινή χρήση μέσω


SmtpNetworkElement.ClientDomain Property

Definition

Gets or sets the client domain name used in the initial SMTP protocol request to connect to an SMTP mail server.

public:
 property System::String ^ ClientDomain { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("clientDomain")]
public string ClientDomain { get; set; }
[<System.Configuration.ConfigurationProperty("clientDomain")>]
member this.ClientDomain : string with get, set
Public Property ClientDomain As String

Property Value

A string that represents the client domain name used in the initial SMTP protocol request to connect to an SMTP mail server.

Attributes

Remarks

The ClientDomain property allows an application to change the client domain name used in the initial SMTP protocol request to an SMTP server. If the ClientDomain 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 ClientDomain 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 ClientDomain 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.

Applies to

See also