Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a website that sends out email

The C# code to do this is:

var mailClient = new SmtpClient { DeliveryMethod = SmtpDeliveryMethod.Network, Host = "localhost", Port = 25 };


The code works fine as this website deployed on a Windows Server 2003 IIS6 works perfectly.

I have configured the SMTP service in IIS7 to deliver to localhost using port 25 and set authentication settings as not required.

Would anybody have any further assistance to help in being able to send emails with iis7 and windows server 2008?

share|improve this question
And the question/problem is? BTW you can format code by using the 101010 button, or by indenting it with 4 spaces – Sander Rijken Dec 27 '09 at 0:42
up vote 2 down vote accepted

IIS7 SMTP is the same as IIS6 SMTP. It wasn't updated, so even the management is done with IIS 6 Manager (even though everything else is IIS7). Edit the server properties and make sure that is added as an approved relay IP address. That will allow it to work without authenticating as long as it's sent from the local machine.

Note: That was required with IIS6 too though so possibly you did this with the IIS6 server at some point in the past.

That's the only change I make to a new IIS SMTP server to ensure that it works from the local machine. (not counting spam settings like reverse and forward DNS entries)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.