email header in php puts additional info on "from"

My PHP is:

$emailSubject = ‘covenantASSIST’;
$webMaster = ‘[email protected]’;

/* Data Variables */
$email = $_POST[‘email’];
$name = $_POST[‘name’];
$comments = $_POST[‘comments’];
$comments = wordwrap($comments, 70);

$body = <<<EOD
Name: $name
Email: $email
Comments:
$comments
EOD;

$headers = “From: $email\n”;
$success = mail($webMaster, $emailSubject, stripslashes($body),
$headers);

The email I receive looks like: -

From: [email protected]

I don’t want the “.degenhartshedd.com.au” part and I can’t see how a) it gets on and b) how to delete it.

Cheers

Based on the PHP you’ve shown, there is no way to answer your question other than assuming it came from a post variable. Show more code, and use the forum PHP tag.

Sponsor our Newsletter | Privacy Policy | Terms of Service