To test this out locally you will need to ensure that you have an SMTP server running locally. If you are on a Windows pc I have used the tool called Free SMTP Server, here is a link for it:
freesmtp.html
If you are on a Mac you may need to do some searching for an equivalent type of program. When the SMTP server is running you should be able to test the email by setting the value in the globals to localhost.