First, you need to check with your ISP what smtp settings they use (and potentially how many emails you get to send before being blacklisted as spammer, depending on what you're going to use this for...)
Secondly, when you have the correct setting in web.config
, you should be able to send to anyone.
EDIT, in response to comment:
To be able to use System.Net.Mail
properly, you should add the smtp settings (which you need to get from the ISP/Hosting service) to web.config
as follows:
<configuration>
<system.net>
<mailSettings>
<smtp from="[email protected]">
<network host="smtpserver1" port="25" userName="username"
password="secret" defaultCredentials="true" />
</smtp>
</mailSettings>
</system.net>
</configuration>
See this tutorial for more information.