Hi,

first of all your code looks right. So you should test basic mail functionality
Code:
<?
mail("[email protected]", "test message", "this is a test", "From: [email protected]");
?>
If this works, there may be a hidden problem inside your code. If it does not work, your website might disallow mail or impose some restrictions - I recall a server where the email domain had to match the website, and some others that suggested to use some custom php script instead of calling mail()

Your script has a basic SECURITY problem: where your form certainly would not allow to input multiline for the name and email address and probably would not allow < to be part of a name, an attacker could just send crafted data to your php with these features. You certainly want to detect that name and email do not contain unwanted characters.

During the last years two solutions have been devised to allow for detection of fake senders - a site could choose to implement one of them, and the receiving server could happen to drop mails that fail verification. Now if YOUR server sends FROM the visitor's domain, and the visitor's domain uses such system, you might not get the mail. You should either add a SENDER header pointing at your domain, or replace the FROM by a REPLY-TO

Musicman