I want to run unit tests (Junit) on some model classes that typically will send emails confirming that things happened. Is there a mock email server that you can use with u
My solution was to wrap the mail server in a class which takes all the config options and has a send() method. In my tests, I'd mock this class and override send() with something that saves the current parameters for the assert.
To test that the mail service itself works, send yourself a mail locally. Try hMail if you're on Windows.