Wednesday, July 6, 2016

Simulating SMTP for a Testing Environment in Mirth

Recently I was writing and testing a channel that would send an email alerting a provider if one of their patients were admitted to an emergency room or urgent care clinic. While I was testing the channel I didn't want the emails to leave my sandbox, and I also didn't want to go through the set up of a whole email system just for a single channel.
As a solution I came across a really nifty java app called FakeSMTP.
FakeSMTP intercepts all email traffic sent through localhost and simulates a full smtp server. All I had to do was double click the jar and set my instance of Mirth to use localhost as the smtp server.
Once I had done that I was able to see all the emails Mirth was sending and even open them in outlook to see how they would actually appear.

You can get FakeSMTP here.

1 comment: