Hi there,
I’m pulling my hair out with this one. When this mail script is run (actioned from a seperate form), the mail appears to be sent fine but the HTML wont display because the script causes an internal error:
malformed header from script. Bad header=/home/sites/e***ign.: confirm.php, referer: http://www.educationaldesign.co.uk/school_enquiry.php
Can anybody see why the header is being corrupted?
Here’s the code:
[code]<?php
ini_set(‘arg_separator.output’,’&’);
$enq=$_POST[‘enquiry_type’];
$name=$_POST[‘name’];
$org=$_POST[‘organisation’];
$sch=$_POST[‘school’];
$lea=$_POST[‘lea’];
$email=$_POST[‘email’];
$tel=$_POST[‘tel’];
$fax=$_POST[‘fax’];
$prod=$_POST[‘product’];
$msg=$_POST[‘msg’];
$pcms=$_POST[‘primary_cms’];
$scms=$_POST[‘secondary_cms’];
$body= “Dear {$name}, nThank you for your enquiry. nYour message has been received by the Educational Web Design team. nYou sould receive a responce within the next 48 hours.nnEducational Web Design.”;
mail($email, ‘Thank you for your Enquiry’, $body, ‘From: info@e*******.co.uk’);
mail(‘info@*******.co.uk’,
/* Subject */ ‘Educational Web Design - Web Enquiry’,
"Enquiry Type: {$enq}n
Name: {$name}n
Organisation: {$org}n
School:{$sch}n
LEA: {$lea}n
Email: {$email}n
Telephone: {$tel}n
Fax: {$fax}n
Product: {$prod}n
Message: {$msg}n
Primary CMS Demo: {$pcms}n
Secondary CMS Demo: {$scms}n
",
“From: {$email}”);
?>
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en">
School Contact
......
[/code]