On Windows PHP needs additional configuration. Especially the SMTP settings are relevant. http://www.php.net/manual/en/mail.configuration.php
The emulator "test-mail-server-tool" listens on the specified port, normally 25 and writes the mail send there into a specific folder. It takes the place of a real SMTP server, in fact it's a dummy for testing purposes. If the mail is sent, it should be in the specified folder of "tmst".
Complete Walk-Through
- install "test-mail-server-tool"
- start the tool
- go to tray: set port 25 and folder for the email output
- create new php file with the source code from the send mail example below
- execute the php file (in your browser or on cli)
- go to the defined email output folder
- find a "*.eml" file with the content of your email
Basic PHP example for sending mail
<?php
$from = "sender@sender.com";
$headers = "From:" . $from;
echo mail ("receiver@receiver.com" ,"headline" , "text", $headers);
?>