cyphersec A blog about Web Application Security and .NET development best practices

28Jun/090

ASP.NET Have emails sent to a folder instead of an SMTP server

While testing, you can have emails sent to a folder on your computer instead of an SMTP server. Just put this in your web.config:
 
<system.net>
         <mailSettings>
              <smtp deliveryMethod="SpecifiedPickupDirectory">
                    <specifiedPickupDirectory pickupDirectoryLocation="c:\Temp\" />
              </smtp>
          </mailSettings>
</system.net>