SMTP server on Windows 7
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.
Solution 1:
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.
Solution 2:
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>