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 at the client side these are usually Windows accounts (user name, password, domain name) of the user who started the application. For the ASP.NET application the default user accounts are the registered user accounts or the impersonator user accounts.

If the property is set to True, the system credentials are used for all queries; if the property is set to False, they are not. The property is set to False by default.

Some SMTP servers request user authentication prior to message sending. Set the property to True when the SmtpClient object, if it is requested by the server, must validate the credentials usage by the current user. If the UseDefaultCredentials property is set to False, the data specified in Credentials is used for connection to server. If the UseDefaultCredentials property is set to False, and the data is not specified in 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