Testing emails in .NET

Testing emails can sometimes be a bit challenging. smtp4dev is a small program that intercepts all received emails so you can quickly send and view emails from any application that uses it as the SMTP server.

For a .NET application just add this to the config file.

<mailSettings>
	<smtp>
		<network host="localhost"/>
	</smtp>
</mailSettings>

Now all emails that the application sends will appear for your viewing pleasure in the email list (pictured below).

Daniel LittleWritten by Daniel Little