Q:

Method for email testing

I am writing a program that will be emailing reports out many (~100) clients which I want to test before I spam everyone.
I want to do a test run against my production data and actually send the messages to a SMTP server, but I don't want the SMTP server to actually deliver the messages.  I want the server to act like a real SMTP server from the perspective of my application, but instead of delivering messages, I just want it to store the messages, and log what happened.
Is there a SMTP server specifically designed for testing purposes?
Does anyone know of a way to configure exim or postfix to behave like I have described above
What do you use to test a mass-email delivery?

A:

In java you can use dumbster
Its easy to use and you can validate every aspect of the email you are intercepting.
It's a Java SMTP server implementation meant for unit testing. (Just make sure you redirect your email to the machine running dumbster...)

I just found another alternative that do almost the same: Greenmail
Greenmail also support POP3, IMAP with SSL so you can test your client against it.

A:

For .NET I set the config file to deliver mail to a folder, then you can have the automated test inspect the directory and files.
<system.net>
 <mailSettings>
  <smtp deliveryMethod="SpecifiedPickupDirectory">
   <specifiedPickupDirectory pickupDirectoryLocation="c:\pickupDirectory"/>
  </smtp>
 </mailSettings>
</system.net>

A:

While searching for options I found the following that may be useful.

DevNullSmtp
Use a null SMTP server for testing
Fake SMTP Service
twisted  examples/emailserver.tac

