Setting up smtp on Windows 7 IIS 7.5

emailiis-7.5smtpwindows 7

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

Best Answer

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.