By using this PHP mail() function. You cant send emails from your desktop or local server.
But you can if you config a mail server in your localhost.