If all you have done is un comment that line its not going to work. Have you specified a mail server as indicated in the previous posts by jbrugger and myself? If you have supplied details for a mail server, make sure they are valid and that the mail server can be reached from the system the script is running on. Failing that, please post the code you now have.