I have a form that uses the post method which sends a email to the relevant persons email address. I have created the script and it all works fine;
$EmailFrom = Trim(stripslashes($_POST['name']));
$EmailTo = "*****";
$Subject = "*****";
$Subject = "**** " . $Subject;
$Name = Trim(stripslashes($_POST['name']));
$Email = Trim(stripslashes($_POST['email']));
$Telephone = Trim(stripslashes($_POST['telephone']));
$Course = Trim(stripslashes($_POST['courseName']));
$Message = Trim(stripslashes($_POST['message']));
// body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "\n";
$Body .= "eMail: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "\n";
$Body .= "Contact number: ";
$Body .= $Telephone;
$Body .= "\n";
$Body .= "\n";
$Body .= "Course or Module name: ";
$Body .= $Course;
$Body .= "\n";
$Body .= "\n";
$Body .= "Message:";
$Body .= "\n";
$Body .= $Message;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
______________________
The problem being that the resulting email that is received comes in with the from being from the name which is what I want, but then this is followed by the domain.
e.g. berty bassett@ourdomain.com
I don't want the domain after the name.
The subject comes through fine without any extra bits after it. If you're wondering why there's 2 subjects it's because of our spam filter.
I'm confused, please help!
cheers
James


