SMTP4Dev as a Windows Service

I have been using the Codeplex solution Smtp4Dev for many years and have always wished there was a windows service version of this application available instead of having the application running in the background.

I rebuilt the application as a windows service and I am releasing it here for anyone to use.


Run the setup.exe to install the application and register the service.

Once installed the following steps need to be performed:

  • navigate to c:\Program Files (x86)\smtp4devsvc\smtp4devsvc\
  • open for editing the file named : Smtp4DevSvc.exe.config (Notepad needs to be run as administrator)
    • this xml file contains the settings for the service’s behavior
  • the DefaultStorePath setting is the path on your local drive (or UNC path) where the email messages will be stored as they come in. As a windows service, there is no interface to display the messages in.
  • The other values should be left as default.
  • Save the configuration xml file
  • go to the services management console and start the Smtp4DevSvc service.

It is set to start automatically on future starts.

Source Code

Installation File

3 Responses to “SMTP4Dev as a Windows Service”

  1. Noah says:

    Hi Mathieu,
    This service worked great for me. But one problem is it overrides the email if it has the same subject. Any chance you can add a date-time stamp to the email filename so it doesn’t overwrite?

  2. Noah says:

    Thanks but I already made this update. I downloaded the source and saw what an easy change it was so I just did it. Thanks!

Leave a Reply