Why doesn't my code send emails?
I think your code is good enough to send email, but you need SMTP server to send the mail (which you has not specified), in case you have a mail server , the easy solution is install SMTP module which needs the SMTP server address and your are good to send email.


  This module allows Drupal to bypass the PHP mail() function and send email directly to an SMTP server. The module supports SMTP authentication and can even connect to servers using SSL if supported by PHP.