Delivering mail to a local folder for testing purposes
By Jeroen on Friday 26 June 2009, 10:41 - Permalink
Adding the following configuration snippet to the web.config file will ensure that System.Net.Mail.SmtpClient is configured to save mails to a local folder. When moving to production, just replace this with the configuration using an smtp server, and you should be good to go!
<system.net> <mailSettings> <smtp deliveryMethod="SpecifiedPickupDirectory"> <specifiedPickupDirectory pickupDirectoryLocation="C:\Temp\MailPickupFolder"/> </smtp> </mailSettings> </system.net>