Local email delivery : Dump email from an app into a local directory for testing

While devving an app on localhost, the email  scripts error out and you cant test what the message would have looked like. With this handy snippet, you can dump any email from your app into a local directory. Slap this into your dev web config file.

<mailSettings>

    <smtp deliveryMethod="SpecifiedPickupDirectory">

      <specifiedPickupDirectory pickupDirectoryLocation="C:\MailDump\" />

      <network host="localhost"/>

    </smtp>

  </mailSettings>

 

Leave a Reply