Your form method is "post". This means that all data passed by the form to sendmail.php will be in the $_POST array.
Try
Code:
$name = $_POST['name'];
further, if this is to be used on a live/production website, sendmail.php should
NOT be as simple as that - you will have to sanitize and validate all of the user entered data.