0

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: http://technet.microsoft.com/en-us/library/cc772058(WS.10).aspx 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?

ERROR:

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()

php.ini:

SMTP = localhost
smtp_port = 25
1

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.

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