what SMTP server are you using?
If you use the credential of the currently logged on user, the mail server
must support NTLM authentication. If it just supports the LOGIN method, it
To check if the server supports this, open a command prompt and type
telnet servername 25
this will open a connection to the smtp server. Then type
This will send an extended helo request to the server. The server will now
list all supported commands. If you find a line stating
the server has NTLM authentication enabled. If not - you can't use the
"vik" <vik@xxxxxx> wrote in message
>I use SmtpClient to send email in my program, and I set the
> UserDefaultCredentials to true to use the logged on user's credentials.
> However it doesn't work on authenticated SMTP server. It will throws
> exception saying 'System.Net.Mail.SmtpException: The SMTP server requires
> secure connection or the client was not authenticated. The server response
> was: 5.7.3 Client was not authenticated'
> However if I set UserDefaultCredentials to false and hard-coded my login
> password for SmtpClient.Credentials, it works. It seems as if the
> UseDefaultCredentials does not set loggon user's credentials correctly.
> Any help would really appreciated.