Help in php mail form AS 2

I have a contact form and I use flash and Php to send information. The form is working perfect with one problem. If I use more than one word in the Name field it shows “unknown sender” in the mail form. If I use only one word like “Ram” the received mail form shows it correctly. Why the php code behave like this I do not know but presume that the I have to amend something in the headers section. One more thing I want if someone enter a valid email account he will get one instant mail confirmation while posting the mail. Is it possible to enhance the code? Please help and look into the code, please…

<?PHP
// read the variables from the string, (this is not needed with some servers).
$theName = $_REQUEST["theName"];
$theEmail = $_REQUEST["theEmail"];
$theTelephone = $_REQUEST["theTelephone"];
$cb_country1 = $_REQUEST["cb_country1"];
$payment = $_REQUEST["payment"];
$theMessage = $_REQUEST["theMessage"];
$to = "xxxxxx@gmail.com";
$subject = "General Feedback Form";
$message = "Name:" . $theName;
$message .= "
Email:" . $theEmail;
$message .= "
Telephone:" . $theTelephone;
$message .= "
Payment:" . $payment;
$message .= "
Country:" . $cb_country1;
$message .= "
Message:" . $theMessage;

$headers = "From: $theName";

// I think this above code has to be changed. 
$headers .= "
Reply-To: $theEmail";
$sentOk = mail($to,$subject,$message,$headers);
echo"sentOk=" . $sentOk;

?>