Well I'm still unclear on what you've done and what's not working.
mail("you@yahoo.com","test","hopefully this works");
This doesn't work for you? If not, then contact whoever is in charge of hosting the web site and ask them if sendmail is configured. It's up to them to set it up for you. If the above code doesn't work then all you can do is hope your host will make the changes for you to be able to use the mail function.
Cgraz