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?
The error I’m receiving:
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
You can use something like smtp4dev (http://smtp4dev.codeplex.com/) instead of iis for test purposes. Works like a charm for me.