I have a lot of apps that send email. Sometimes it's one or two messages at a time. Sometimes it's thousands of messages.
In development, I usually test by substituting my own address for any recipient addresses. I'm sure that's what everybody else does, until they get fed up with it and find a better solution.
I was thinking about creating a dummy SMTP server that just catches the messages and dumps them in a SQLLite database, or an mbox file, or whatever.
But surely such a tool already exists? How do you test sending email?
This is similar to the smtp4dev except implemented in java so it works for non-windows developers.
http://www.aboutmyip.com/AboutMyXApp/DevNullSmtp.jsp
You can also use netDumbster.
http://netdumbster.codeplex.com/
I faced the same problem a few weeks ago and wrote this: http://smtp4dev.codeplex.com
There is also Papercut and Neptune, too bad none of these can be run in a portable way.
I've been using "Test Mail Server Tool" from ToolHeap for years.
http://www.toolheap.com/test-mail-server-tool/
It is a simple app that runs in your system tray and dumps emails to a folder. It can also be configured to open each email in your default mail program.
A few ago I came across the following solution for the .NET platform.
Simply place the above code in your App.config or Web.config. When you send a message now it will be stored as a file in the directory you provided as "pickupDirectoryLocation". Works like a charm.