Hi
I have developed a windows service that receives requests to send out emails via a SQL database. Other applications populate the database and the windows service checks the database and processes the information to send out an email. I am struggling with understanding how specifying credentials works. I want it to use a specific domain username/password and I thought it was working but I noticed it sends out emails regardless of what I set as the username and password. I have the following code in regards to the credentials:
smtp.UseDefaultCredentials = false;
smtp.Credentials = new System.Net.NetworkCredential("test", "fail");
So in this case where username is test and password is fail - I would have thought this should not work. However it works! Why is it not failing?
Thanks!
Dan
I have developed a windows service that receives requests to send out emails via a SQL database. Other applications populate the database and the windows service checks the database and processes the information to send out an email. I am struggling with understanding how specifying credentials works. I want it to use a specific domain username/password and I thought it was working but I noticed it sends out emails regardless of what I set as the username and password. I have the following code in regards to the credentials:
smtp.UseDefaultCredentials = false;
smtp.Credentials = new System.Net.NetworkCredential("test", "fail");
So in this case where username is test and password is fail - I would have thought this should not work. However it works! Why is it not failing?
Thanks!
Dan