I'm using a simple mail() function to handle form elements contained in another php document. The mail script is something like this:
headers .= "From: $name <$email>\n";
$recipient = $contactname;
$msg .= wordwrap($msg, 1064);
$subject = "A message about your site from " . $name;
mail($recipient, $subject, $msg, $headers);
The script works perfectly on one host, so the variables are all okay. However, on another host that I am using, the email that I get back has the "from" address as either blank or "nobody". And the message body (which is $msg) is blank. The subject line is okay, except it doesn't show the value contained in $name.
Information is going between the two documents, because otherwise the email wouldn't come through, right?
Anything I can do to fix this, or why it won't work, would be greatly appreciated. Thanks!