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?

  • 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

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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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