30

Is it possible to install the SMTP server that you can install in Windows Server 2008 in Windows 7? Or something similar?

I'm developing an application that will make use of it and I want to be able to test it and try it locally.

7 Answers 7

44

Since I needed this only for development, I ended up using smtp4dev, which is exactly what you need when developing an application that sends emails.

The project description:

Dummy SMTP server that sits in the system tray and does not deliver the received messages. The received messages can be quickly viewed, saved and the source/structure inspected. Useful for testing/debugging software that generates email.

1
  • 1
    Nice tool, better then filling up my gmail account ;)
    – rdkleine
    Jun 30, 2010 at 9:27
6

For .NET applications on Windows, you can add the following to your web.config or app.config file to capture outgoing email into a local folder for viewing.

The specifiedPickupDirectory element needs to be customized with a path on your hard disk that allows the web site user or app pool writable permissions (e.g. Network Service or whatever the site is running under).

</configuration>

  <!-- other configuration elements -->

  <system.net>
    <mailSettings>
      <smtp deliveryMethod="SpecifiedPickupDirectory">
        <specifiedPickupDirectory pickupDirectoryLocation="C:\capture\mail" />
      </smtp>
    </mailSettings>
  </system.net>

</configuration>
2
  • This is just awesome!! I would give 10 upvotes if I could! Feb 12, 2014 at 15:15
  • This is the simplest solution for most cases! Thanks Nov 2, 2015 at 17:21
5

hMailServer is the easiest way to get an SMTP service running on Windows 7 and Vista.

3
2

No, Microsoft is not including any SMTP/POP3 service in Windows anymore.

1

IIRC Windows 2008 includes the old SMTP service that came with IIS6 (you'll find it under the II6 compatibility/legacy section or the features/roles areas) though this is unlikely to appear in later Windows Server editions and isn't found in Vista at all so I would recommend against relying on it.

On older Windows versions I would recommend Cygwin's exim port, but I have had trouble with that on 2008 (last time I checked Vista and 2008 were not officially supported platforms though that may have changed by now, but I doubt 7 is supported yet).

A quick Google brings up hMailServer that seems to be free though no longer open source (you can still get the source for the older 4.x versions).

Other than that, you could add a basic Linux install somewhere on your network, perhaps in a virtual machine running on one of your existing machines or a little old PC you have spare. A very basic (no X) Debian install running Exim4 should fit in 64Mb.

-1

If it were me, I'd be running Linux and your MTA of choice inside a virtual machine using VMware Server or VirtualBox. A bit more overhead than running a native MTA but so much more powerful and self-contained.

1
  • That's heavy wait to test my mail-sending application twice, and also, on the production server it'll send through localhost and I need the same on my dev machine. Sep 24, 2009 at 5:25
-1

Just install IIS and ASP services for IIS and then check IIS manager SMTP will be installed automatically. and from there u can configure it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .