You need to change your email server configuration to connect to either an email server you setup yourself on "localhost" or if you have the interwebs you can connect to a dummy smtp server like "smtp.mailinator.com" provided by the guys at http://www.mailinator.com. Google it.
Admin
Registered: 18 years ago
Posts: 10,001
Rating: 353
XAMPP or EasyPHP will not send mail because it does not have a channel to the Internet (even if you are connected to the Internet). I can see in your code if it will work, so it does not have to work.
There is a post elsewhere on how to get it ti send mail, but it is too much effort. Much easier to test on a live server.