SMTP4DEV

Monday, January 7. 2013

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 http://smtp4dev.codeplex.com. 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.

 

Twitter Bookmark SMTP4DEV  at del.icio.us Facebook FriendFeed Digg SMTP4DEV Bloglines SMTP4DEV Technorati SMTP4DEV Bookmark SMTP4DEV  at YahooMyWeb Bookmark SMTP4DEV  at reddit.com Bookmark SMTP4DEV  at NewsVine Bookmark SMTP4DEV  at blogmarks Bookmark using any bookmark manager! Stumble It! Print this article! E-mail this story to a friend!