Just realized that in web.config you can specify a directory to “send” mail to instead of using a smtp-server, pretty neat. Just change to the following where you specify the smtp settings and you won’t have any troubles with smtp-servers. Just don’t forget to change this when you really need to send a mail.
<system.net>
<mailSettings>
<smtp deliveryMethod="SpecifiedPickupDirectory">
<specifiedPickupDirectory
pickupDirectoryLocation="c:\directory\to\emails\" />
</smtp>
</mailSettings>
</system.net>
Tags: episerver
-
Another convenient option is to use smtp4dev available at codeplex
Then you get a nice little systray application that pops up whenever you send an email from your local server, just specify localhost as your smtp server in web.config.


6 comments
Comments feed for this article
Trackback link: http://antecknat.se/blog/2010/08/01/send-mail-in-development-environment/trackback/