I want to use the include() function in my mail() but when I send the PHP to HTML email, all I get in the content of my email is 1. Here is my basic code
Code: Select all
<?php
// includes HTML email prebuilt -textt.php
$text = include('text.php');
// multiple recipients
$to = ' baba@baba.co' . ', '; // note the comma
$to .= ' baba@baba.co;
// subject
$subject = 'email test ';
// message
$message = ' $text';
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'To: ' . "\r\n";
$headers .= 'From: baba@baba.com' . "\r\n";
$headers .= 'Cc: ' . "\r\n";
$headers .= 'Bcc: baba@baba.com' . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
?>
Thanks
Daniel