43

How can I get SMTP to work on a Windows 7 development box? I used to just be able to turn on the IIS SMTP server on Windows XP. Is SMTP not included with Windows 7? If so, what can I use instead as a free relay mechanism?

J0e3gan
  • 8,740
  • 10
  • 53
  • 80
JoeLangley
  • 435
  • 1
  • 4
  • 5
  • 2
    If you need this for development I found this solution really helpfull(smtp4dev): http://serverfault.com/questions/64753/smtp-server-on-windows-7 – gigi Oct 13 '12 at 08:33

7 Answers7

58

If you are developing in ASP.net using the built-in mail libraries, a lesser-known configuration setting is to use the following:

<configuration>
. . . more config stuff here . . .     
  <system.net>
    <mailSettings>
      <smtp deliveryMethod="SpecifiedPickupDirectory" from="noreply@testdomain.org">
        <specifiedPickupDirectory pickupDirectoryLocation="c:\smtp\"/>
      </smtp>
    </mailSettings>
  </system.net>
</configuration>

All your application generated emails will be dumped into this directory during development. No smtp server needed!

SpazDude
  • 924
  • 1
  • 7
  • 11
24

SMTP isn't included with Windows Vista, either - you'll have to download and install a free third-party SMTP server. There are a number available - http://www.softstack.com/freesmtp.html being one.

UPDATE: Some more options - Vista's IIS Instance doesn't have SMTP (Solutions?)

Community
  • 1
  • 1
SqlRyan
  • 33,116
  • 33
  • 114
  • 199
11

You can use Google's as a free relay, however you need to have a Google account.

smtp.gmail.com

Just make sure the ports are setup as defined for your account.

Nick Berardi
  • 54,393
  • 15
  • 113
  • 135
  • This is by far the easiest way for testing purposes. Here is a link for the configuration information. http://www.geekzone.co.nz/tonyhughes/599 – trevorc Dec 20 '11 at 18:25
  • This worked for me. See my detailed answer here: http://stackoverflow.com/questions/112190/php-ini-smtp-how-do-you-pass-username-password/9642876#9642876 – B Seven Mar 10 '12 at 00:51
2

According to this post, the issue an SMTP server was included in IIS6, but has been removed in IIS7. This thread suggests the Remote Server Administration Tools (which include a SMTP server), as long as you don't have the Home edition of Windows.

Casebash
  • 114,675
  • 90
  • 247
  • 350
  • 8
    It appears that the "Remote Server Administration Tools" doesn't install nor give access to a local SMTP but let you manage a SMTP on a remote 2008 Server. It does not install a local SMTP. – Eric Bonnot Apr 04 '12 at 14:38
1

I use "Free SMTP Server" from Softstack.

http://www.softstack.com/freesmtp.html

HTH

dotnetnutty
  • 381
  • 5
  • 10
1

For those still coming across this, I've played with the two servers suggested above (freesmtp and hmailserver). Freesmtp is very quick and simple and worked out the box but only lets you send 10 emails a day without paying $69. hmailserver takes longer to set up (although still fairly painless) but has more features and hasn't asked me for money (yet).

webdevduck
  • 563
  • 5
  • 18
0

I had the same problem, and I installed hMailServer.
http://hmailserver.com/

Juan Carlos Velez
  • 2,840
  • 2
  • 34
  • 48