Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use a local SMTP server when developing on Windows 7? [closed]

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?

like image 345
JoeLangley Avatar asked Jul 13 '09 15:07

JoeLangley


People also ask

How do I run a local SMTP server?

Use Add or Remove Programs in the Windows Control Panel to launch Add/Remove Windows Components. Select Internet Information Services (IIS) and then click Details. Check SMTP Service and then click OK. The installation process will prompt you for your Windows CD and will install the SMTP virtual server.

Can I run my own SMTP server?

You can use a hosted SMTP relay service that provides scalable email relaying capabilities right out of the box. Or you can setup your own SMTP server, by building on top of an open source SMTP server solution.

How do I start a fake SMTP server?

smtp4dev is an open-source fake SMTP server frequently used for development purposes. The fastest way to get started with this option is to install Docker on your development machine and use the smtp4dev Docker container.


1 Answers

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="[email protected]">         <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!

like image 62
SpazDude Avatar answered Sep 28 '22 12:09

SpazDude