I need to validate the username and password set in SmtpClient object before sending mail.
Here is the code sample:
SmtpClient client=new SmtpClient(host);
client.Credentials=new NetworkdCredentials(username,password);
client.UseDefaultCredentials=false;
//Here I need to verify the credentials(i.e. username and password)
client.Send(mail);
Thanks in advance.....