Skip to content

Contact Us    Now Hiring

@meritweb on TwitterMerit Solutions on LinkedInMerit Solutions YouTube Video SeriesMerit Solutions on FacebookSubscribe to Merit Matters Blog



Testing e-mail functionality in your Microsoft Dynamics AX/GP application/customization using external e-mail servers has always been a frustrating process. If your test e-mail somehow avoids anti-spam and other SMTP server services, it will still take several minutes to receive. Sometimes, it can take 5 – 10 minutes for your sent e-mail to arrive at the destination - and you can never be sure if your test e-mail is late or if delivery has failed due to an error in your application.

Wouldn't it be great to have a mock application that pretends to be a SMTP server and shows you what you sent immediately? That is exactly what SMTP4DEV does.

SMTP4DEV is free and you can download it from CodePlex at All you have to do is unpack and run, and make sure your mock SMTP server is listening.

Once you have SMTP4DEV running and listening, you can use the sample C# code to send an e-mail to your mock SMTP server. Notice the From and To e-mail addresses; they can be anything.

Execute the sample C# code and your test e-mail will immediately show in SMTP4DEV.

Now stop listening on port 25 and execute the same sample C# code again. Since SMTP server is no longer available, SmtpClient will throw an exception.