smtp
Using an Smtp client in ASP.NET MVC 4 and C#
If you need to send emails from your website, the .NET framework provides a very handy library for this: System.Net.Mail. The configuration and testing is pretty straightforward so let’s get started. Firstly we need to configure the SMTP settings in the web.config. Under the <configuration> element add the following config section:
|
1 2 3 4 5 6 7 8 9 10 |
<system.net> <mailSettings> <!-- Method#1: Send emails over the network --> <smtp deliveryMethod="Network" from="anyemailaddress@test.com"> <network host="your_smpt_server_dns_name" userName="your_smpt_server_username" password="your_smpt_server_password" port="25" /> </smtp> </mailSettings> </system.net> |
The port in [...]



