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 [email protected]. I want that email to go to [email protected]. 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!

3 Answers 3

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.

2
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.

1
  • 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, 2009 at 19:35
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .