Please see my comment to the question. In second thought, maybe it's only good that you did not even try to send any mail. This is a very dangerous operation. (Surprised?)
You really need to understand very well what you are doing, otherwise your host is turned into a zombie sending spam, or something like that, and it can be done without much effort in no time. Please see my past answer:
unable to send mail , it showing the error in below code.
See also:
In what way $('#myelement').valid(); works.
As to sending e-mail, here is a couple of options which you could easily find out in original PHP documentation:
PHP: mail — Manual,
Manual :: sends a mail,
(see also
https://pear.php.net/manual/en/about-pear.php).
—SA