I'm trying to get email working in my application. In my web.config I have:
<system.net>
<mailSettings>
<smtp from="myemail@email.com">
<network host="A host address" port="37" />
</smtp>
</mailSettings>
</system.net>
Now in the code I new up a SmtpClient();
var client = new SmtpClient();
Then I have to go ahead and set the port and host?
client.Host = "A host address";
client.Port = 37;
I'm confused by this. I don't understand the point of setting them in the webconfig if when you new up a SmtpClient you have to go ahead and set the variables.
Am I missing something?