smtp4dev is an excellent testing tool to add to your tools library. Go ahead and download smtp4dev from CodePlex. It is a dummy SMTP server which is compatible with Windows 7/Vista/XP/2003/2010. smtp4dev Will sit in the system tray and listen for messages on the port you specify (usually port 25).
The best thing about smtp4dev is that it will not deliver the received messages. You can then view the messages or save them and inspect the source/structure. This makes smtp4dev very useful for testing/debugging software that needs to generate emails. I recently used it to test the email functionality from a VBScript.
Using Email Viewers With smtp4dev
One of the things to remember is to use a viewer to view the emails caught by smtp4dev. The quickest one to install and use is Windows Live mail. The easiest way to get Windows Live Mail is to download and install Windows Essentials which is free. Apart from Windows Live Mail, Windows Essentials includes Photo Gallery, Movie Maker and Windows Live Writer for creating blog posts. You can however choose which packages you want to install at installation time.
After completing my install, I wanted to view a mail in smtp4dev. For the first time, I received an error when trying to view an email using Windows Live Writer and smtp4dev. (Please note, this error was as a result of Windows Live Mail and NOT smtp4dev)
The error I received was:
The program can’t start because WLDCore.dll is missing from your computer. Try reinstalling the program to fix this problem
This was strange to me as I had just installed Windows Live Mail in my test VM. (I love VirtualBox for setting up testing environments and testing different software or new Operating Systems. See my post: Clone VirtualBox VM’s Easily To Provide a Fresh Dev Environment)
Luckily the resolution to this issue was a really easy one.
Simply navigate to the Windows Live installation folder and copy the wldcore.dll file from the Shared folder.
Navigate to the Mail folder and paste the wldcore.dll file in there.
This time, when you click on a mail to view in smtp4dev, you will see Windows Live Mail start without a problem.