I have a form on my website for user input. The form is sent using the
following php script:
<?
$header="From: $name <$email>";
foreach ($HTTP_POST_VARS as $key => $value)
{
if($key == "recipient")
{
$recipient = $value;
}elseif($key == "subject")
{
$subject = $value;
}elseif($key == "redirect")
{
$redirect = $value;
}elseif($key == "required")
{
$required = $value;
}else
{
$message .= "$key: $value\n";
}
}
if($required)
{
$required=split(",",$required);
foreach($required as $value)
{
if($$value=="")
{
echo "You must enter the required
information!<P>";
echo "Please go back and fill out the form.<BR>";
$goback=1;
}
}
}
if(!$goback)
{
$subject = stripslashes($subject);
$message = stripslashes($message);
mail($recipient,$subject,$message,$header);
if($redirect)
{
header ("Location: $redirect");
}
}
?>
But, for some reason, the e-mails I am getting now look like this:
Return-Path: <nobody@>
Received: from xxxxxxxxx () by xxxxx with
SMTP (Eudora Internet Mail Server 3.2b5) for <xxxx@turners.com>;
Wed, 12 Feb 2003 07:15:04 -0800
Received: (nobody@localhost) by xxxxxx (8.9.3) id HAA07078
sender nobody; Wed, 12 Feb 2003 07:14:56 -0800
Date: Wed, 12 Feb 2003 07:14:56 -0800
Message-Id: <200302121514.HAA07078@xxxxx>
To: xxx@turners.com
Subject: Turner's Response Form
From: xxxx <xxxxx@HOTMAIL.COM>
name: xxxxx
company: xxxxxx
address: xxxxx
city: xxx
state: CA
zip: xxx
phone: xxx
fax: N/A
webaddress: [url]http://[/url]
email: xxxx
comments: xxxx
Send: Send Message
You will notice there is no space after the From and where the message
body starts. Because of that my mail client will not display the message.
This script used to work with no problems. The only thing that has
changed is my hosting provider installed PHP 4.3.0. Would that make a
difference? Or do I need to look elsewhere?
Thanks,
Jeff