Trying to send a PHP email the easy way but I cannot work out why this one does not work. For some reason it sends 3 emails all with their entire content being '1' . That is all.
The PHP
else if (isset($_GET['quoteemail'])) {
$email = include(TEMPLATEPATH . '/bookings/booking-quote.php');
$to = $current_user->user_email;
$subject = "Your Order - Dive The Gap" ;
$message = $email;
$headers = "From: Dive The Gap Bookings <ask@divethegap.com>" . "
" .
"Content-type: text/html" . "
";
mail($to, $subject, $message, $headers);
}
Don't worry about the else if, their is an IF or 2 before this function.
Any ideas,
Marvellous
include, that includes a file and tells you "1" when it successfully includes the file.
You probably want to look into the function: file_get_contents();