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 configured a php/mysql app on my local laptop using iis7 for testing. I use php mail() to send emails using localhost smtp service on the server and want to replicate locally for testing. (it has been working fine for a long time on the server so I just want to replicate locally for testing purposes.)

Using the technet article: I was able to configure my SMTP settings however, I still can't send email.

I have recycled the server a number of times with no effect.

I've ran a netstat -an and there is nothing listening on port25 - is there something else I need to do to get the smtp service listening on port25?


PHP Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()


SMTP = localhost
smtp_port = 25
share|improve this question
up vote 1 down vote accepted

IIS of Windows Vista and Windows 7 dont have SMTP server available. So following the document you used you should write another SMTP as a Windows Server 2008 R2, not the localhost. SMTP server it's not available.

You can instead use another SMTP for your tests like this.

Check this blog post of a Microsoft MVP of IIS.

share|improve this answer
I have seen all those documents however, nowhere in any of these documents did it state that the smtp feature in iis will not work without a locally installed smtp server! what purpose does the iis smtp feature serve??? If I install a local smtp server, there is no point using iis smtp feature! would have been much easier if the simple line was added to the documentation "this does not act as an smtp server - you will still need to install an smtp server for this feature to work" what a waste of my time!!! – php-b-grader Aug 27 '11 at 22:14
Yes @php-b-grader. It could be an error of the Microsoft Technet documentation. The SMTP feature that you see, is only a UI to setup the ASP.NET/System.Net SMTP configuration. Windows 7 and Windows Vista do not include the SMTP Server. – Ricardo Polo Aug 27 '11 at 22:28

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.