You may already know that Microsoft dropped SMTP in client OS since Windows Vista, so apparently Windows 7 will not have SMTP either. If you need a SMTP on your local machine to test and debug your mail function as I do, you can install a free third-party SMTP server called Free SMTP Server. The installation is very straight forward and you don’t need to do any customization. In your application, just use “localhost” as the SMTP host and you are done. Here is an example of using Free SMTP Sever to send a test email in Visual Studio 2008 web application.
The SMTP settings can be stored in web.config:
A sample email snippet:
When the above code snippet is executing, you will see an active connection in Free SMTP Server shown as follows:
Note: you will need to keep Free SMTP Server running in order to use it to send email in your web application.