I need to configure a SMTP server for testing my website which sends emails (for registration confirmation etc).
I dont actually want the email to be sent, I just w
There's also Papercut which is an SMTP server which will receive messages but not deliver them anywhere (allowing you to make sure they are being sent correctly). The received messages are visible in a small GUI and are also written to a directory.
there's also my very own http://ssfd.codeplex.com/ which is an open source SMTP emulator. Receives e-mail and drops them in a folder which can be accessed by a task icon
For .NET guys out there. Keeping it simple.
We were looking into this and then one of the developers remembered about a the config setting that allows you to override how the emails are sent.
This will create a file per email and leave it alone.
<system.net>
<mailSettings>
<smtp deliveryMethod="SpecifiedPickupDirectory">
<specifiedPickupDirectory pickupDirectoryLocation="\\SharedFolder\MailDrop\" />
</smtp>
</mailSettings>
</system.net>
As noted by Sean Carpenter, Papercut is a powerful solution for local development. If you also run a staging or testing server, however, mailtrap.io may be a simpler solution overall, because you can use the same approach for your dev and staging environments.
In .NET, SmtpClient can be configured to send email by placing it in a pickup directory.
The default constructor of SmtpClient takes its settings from app.config, so for a test environment we can configure it as follows.
<configuration>
<system.net>
<mailSettings>
<smtp deliveryMethod="specifiedPickupDirectory">
<specifiedPickupDirectory pickupDirectoryLocation="path to a directory" />
</smtp>
</mailSettings>
</system.net>
</configuration>
MSDN reference - app.config mailSettings element http://msdn.microsoft.com/en-us/library/w355a94k.aspx
The smtp4dev project is another dummy SMTP server. I like it because it has a nice, simple UI that logs the messages and lets you view the contents of recent messages. Written in C# with an MSI installer. Source code is available.