Ever wished you could test the output of your MailMessages without actually sending the message anywhere? You could use the DeliveryMethod of the SmtpClient with SpecifiedPickupDirectory and try and round trip the email through the file system. This is troublesome as you have to remember to delete all the files in the output directory before calling Send, then scan the folder for the new file. It also prevents you from any sort of multi-threaded testing.
↧