Neil_Bradley
asked on
ob_get_clean();
The code attached below works. An html email message is sent in the function called display_email(); using this code:
ob_start();
display_email();
$msg .= ob_get_clean();
I have constructed the actual message in a function as the email contained quite a bit of dynamic informaion and it seemed to be the only way I could get the email to send its content.
My question relates to an errror I recieve in de bug mode that states that the variable $msg is undefined. My code works, everying seems to function just fine hower I would preref to figure out what the undefined $msg variabke is all about. Especially as the $msg is there when it pop out as an email message.
Thanks,
N
ob_start();
display_email();
$msg .= ob_get_clean();
I have constructed the actual message in a function as the email contained quite a bit of dynamic informaion and it seemed to be the only way I could get the email to send its content.
My question relates to an errror I recieve in de bug mode that states that the variable $msg is undefined. My code works, everying seems to function just fine hower I would preref to figure out what the undefined $msg variabke is all about. Especially as the $msg is there when it pop out as an email message.
Thanks,
N
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "Reply-To: ".$_POST['fp']['Contact Email Address'][0]." \r\n";
$headers .= "From: ".$_POST['fp']['Contact Email Address'][0]."\r\n";
// Send
$subject = $_POST['subject'];
$to = "someemail@somedoman.com" ;
ob_start();
display_responce($_POST['heading'], $_POST['subject'], $_POST['fp'], $_POST['sf']);
$msg .= ob_get_clean();
mail($to, $subject, $msg, $headers);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cheers,
N