SyntaxFix
Write A Post
Hire A Developer
Questions
Ensure you set SmtpClient.Credentials after calling SmtpClient.UseDefaultCredentials = false.
SmtpClient.Credentials
SmtpClient.UseDefaultCredentials = false
The order is important as setting SmtpClient.UseDefaultCredentials = false will reset SmtpClient.Credentials to null.