INetSmtpClient.UseDefaultCredentials

Syntax

UseDefaultCredentials: Boolean;

Description

The UseDefaultCredentials property determines whether to use for all the queries the system accounts for the current security context in which the application is executed.

Comments

For the application on the client side these are usually Windows accounts (user name, password, domain name) of the user who ran the application. For the ASP.NET application the default user accounts are the registered user accounts or the impersonator user accounts.

When the value is True, the system credentials are used for all queries, when the value is False, they are not. By default the property is set to False.

Some SMTP servers request user authentication prior to message sending. Set the True value when the SmtpClient object, if it is requested by the server, needs to validate the credentials usage by the current user. If the UseDefaultCredentials property is set to False, the data specified in the Credentials is used for connection to server. If the UseDefaultCredentials property is set to False, and the data is not specified in the Credentials, the message to server is sent anonymously.

NOTE. The system credentials are applied to the following authentication types only: NTLM, Digest, Kerberos and Negotiate.

See also:

INetSmtpClient