1

I am trying to set up a development environment for our web server. I would like all emails that are relayed by the server go to a specific mailbox, regardless of who they were sent to. For example, some application on the server sends an email to shopper@yahoo.com. I want that email to go to devbox@mysite.com. Is that possible to do with IIS/Virtual SMTP? Is there some other way of doing this? I don't have exchange server running, if that makes a difference.

Any help would be greatly appreciated. Thanks a lot!

Greg R
  • 123
  • 5

3 Answers3

1

I normally setup the SMTP server to use a drop directory and avoid the destination mailbox completely. Then give read access to that folder to everyone who needs it.

This also avoids the problem of no SMTP server as part of IIS 7 (on Vista).

If your app is written in .NET you can configure that directly via the configuration/system.net/mailSettings/smtp section of web.config or app.config -- set the deliveryMethod attribute to SpecifiedPickupDirectory.

devstuff
  • 206
  • 1
  • 5
  • Thanks, that's a good idea. I like a server option better, just because if something goes wrong with the config files, real customers might get dev emails. – Greg R Aug 12 '09 at 19:35
0

IIS' SMTP server isn't particularly bright. I'd recommend using a more intelligent mail server that you control perform the address munging and/or forwarding to a specific address, and having IIS' SMTP server "smart host" to it.

The "more intelligent" mail server need not be a normal mail MTA application; a simple script that opens a network socket, implements just enough SMTP to catch the mail from IIS and write it out to a log file would work just fine.

Greg Work
  • 1,966
  • 12
  • 11
  • Thanks Greg. Is there an open source / free solution for this? – Greg R Aug 12 '09 at 19:23
  • Found this: http://www.antix.co.uk/Projects/SMTPServerForDevelopers There is also this: http://www.donovanbrown.com/post/2008/10/20/Neptune.aspx This is exactly what I need – Greg R Aug 12 '09 at 19:35
0

If you want a custom server option you might look at hMailServer as well (free and easy to use)