Mail integration testing without spamming the world

I was recently reviewing this scenario with a client. In my last company we used to run a lot of scheduled email systems for notifications. That was great in practice but in testing we had to make sure we didn’t send test emails to live account. We really wanted to test the email system (and we hadn’t yet isolated the email for unit testing), so we needed to catch emails and stop them from being forwarded.

After a little searching I set up Jeff Brown’s Loopback Mail Server. In retrospect, this is one of my most favorite test tools. It’s simple. It works. It requires you buy a library, but that’s pretty cheap.