Remove the quotes a single quote states to take the string literally, therefore echo '$email' would print $email not the value that the varable $email holds.
Your code should be:
$subject="a message from my website";
mail ($to, $subject, $body, $header);
Better yet, don't use the header, I found out that it is possible for a users to add to the header. What I did was place the From: field and the remote IP inside the body of the message. But this was for emails to me only. Then should anyone spam me with the contact page, I knew their ip address to add to the htaccess file for blocking.
Hope this helps,