IIS pickup directory

To specify the pickup directory when sending emails using settings in Web.config, use the following code for your mailSettings section in Web.config:

<smtp from="foo@bar.com" deliveryMethod="SpecifiedPickupDirectory">
  <specifiedPickupDirectory pickupDirectoryLocation="c:\temp\maildrop\"/>
</smtp>

Also, remember to use System.Net.Mail, not System.Web.Mail – it doesn’t use settings specified in Web.config.