Writing integration tests for sending emails

I searched several times for SMTP servers that can be started during my integration/component tests for asserting that my email components are ok. All of them were hard to include or dod not support the full range of features (e.g. one of the did not support BC/BCC headers).

This time I found an easy to use (3 lines of code in your integration test) SMTP that seems to be support all featueres. It’s name is subethasmtp and comes with a special framework for integration (they call it UnitTest there) tests named Wiser


If you only want to visualize incoming mails, FakeSMTP is what you’re looking for.

This entry was posted in Java, Projects, Tips. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s