How can I test the mail () function on my local server?
I use Windows 8.
I tried using the 'Test Mail Server Tool' (http://www.toolheap.com/test-mail-server-tool/) tool but it did not work, the email was not saved anywhere after the execution of the function .
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
Basic PHP example for sending mail
<?php
$from = "sender@sender.com";
$headers = "From:" . $from;
echo mail ("receiver@receiver.com" ,"headline" , "text", $headers);
?>