PHP email problems

I’m having real issues getting this php script to work properly, and my web hosts aren’t being much help. Everyone I talk to says it should work fine.

The variables are coming in from a flash form.

The issue is as follows:

Instead of the name, for example, John Smith, appearing in the From: field properly in my email application (and others that I have tested) it appears like this:

John@web10.asio.net, Smith@web10.asio.net

web10.asio.net being the localhost.

Is there away around this some how?

Heres the script.



<?php
$to  = '*********@gmail.com';


$message = $_POST["message"];   
$telephone = $_POST["telephone"];  
$company = $_POST["company"]; 
$name = $_POST["name"]; 

$subject = 'Inquiry';


$msg = "<p><b>Name:</b>" . $name .  "</p>" . "<p><b>Company:</b>" . $company . "</p>" . "<p><b>Telephone:</b>" . $telephone . "</p>" . "<p><b>Enquiry:</b>" .$message . "</p>"; 

$headers = "Content-Type: text/html; charset=\"windows-1251\"
";
$headers .= "From: " . $_POST["name"] . "
";
$headers .= "Reply-To: " . $_POST["email"] . "
";
$headers .= "Return-path: " . $_POST["email"]."
"; 
   
mail($to, $subject, $msg, $headers);

?>