Normally, php mail's function doesn't *work* on Windows because there is no sendmail server running by default.
Some people got it working using Fake Sendmail and Stunnel & an external service such as Gmail/Yahoo, and others using msmtp.
I didn't want my gmail or other credentials saved on the computer or a too complicated solution that may be hard to troubleshoot so I decided to use the Mandrill service to send emails from my development machine.
Extract the archive contents in c:\usr\lib Important Note: if you're running Windows 7 or 8 (not sure for Vista) you need to set XP Compatibility Mode. To do that right click on Sendmail.exe and click on properties and then enable XP compatibility mode (shown below).
Create an API key (which will be your password) by going to Settings
Configure Fake Sendmail (shown below)
Restart Web Server or restart computer if that's easier.
Enable XP Compatibility Mode on Fake Sendmail
php.ini configuration (partial)
Fake Sendmail Configuration (Windows) Make sure you edit the following.
Note: if you're configuring your own copy of the config file make sure you don't use encryption i.e. smtp_ssl=none (as shown in the snippet). I've had no problems using the command line scripts, however, the php script would hang if Fake Sendmail used encryption.