Chances are everything is wokring correctly. The only problem is that you are using xampp which has no built in mail processor. When you upload it to a web server everything should work ok assuming you have no other errors.