Why do I get the error message ‘The type or namespace name ‘CacheDependency’ could not be found (are you missing a using directive or an assembly reference?) ‘
Use namespace System.Web.Caching or refer to it as System.Web.Caching.CacheDependency
Why do I get the error message ‘550 5.7.1 Unable to relay for xxx or 550 not local host xxx, not a gateway ‘
The SMTP server is not configured to allow you to relay. If you are working with a local SMTP server, you can configure it to allow relaying for IP 127.0.0.1.
How can I read POP3 email with ASP.NET
Refer Read POP3 Email with ASP.NET
How do I configure a local SMTP server?
Install the SMTP virtual server that is part of IIS. You will need your Windows installation CD. Use Add or Remove Programs in the Windows Control Panel to launch Add/Remove Windows Components. Select Internet Information Services (IIS) and then click Details. Check SMTP Service and then click OK. The installation process will prompt you for your Windows CD and will install the SMTP virtual server. After installing the SMTP server (also reboot), configure it by following these steps: In the Control Panel, choose Administrative Tools, and then choose Internet Information Services. Open the node for your computer, right-click the Default SMTP Virtual Server node and choose Properties. In the Access tab, click Connection. Select Only the list below, click Add and add the IP 127.0.0.1. This restricts connections to just the local computer, i.e., localhost. Close the Connection dialog box. Click Relay and repeat Step 5 to allow only localhost to relay through this server. In your firewall or router (or both), close incoming port 25. This is an important security measure that will prevent spammers from finding your SMTP server and using it to relay spam.
What is the namespace used for sending mails
Use System.Web.Mail The System.Web.Mail namespace contains classes that enable you to construct and send messages using the CDOSYS (Collaboration Data Objects for Windows 2000) message component. The mail message is delivered either through the SMTP mail service built into Microsoft Windows 2000 or through an arbitrary SMTP server. The classes in this namespace can be used from ASP.NET or from any managed application. For more details refer System.Web.Mail Namespace