I have a script that will send an email to somebody. The form is located here. However, when I open up the email (in Outlook Express) the message is repeated twice. Why is this? You can look at the source for the form code, and here is the PHP script:
Why is it repeating in the email? If you want to, you can send an email to yourself, and see what I mean. Also, how can I make it output some text once the email is sent?
// define following variables. if one does not apply, leave BLANK
$recipient = $recipient;
$recipientemail = $recipientemail;
$subject = $subject;
$message = $message;
$fromname = $fromname;
$fromemail = $fromemail;
$recipient .= "$recipient <$recipientemail>";
$subject = "$subject";
$message .= "$message";
// you can add a stock signature //
// to add signature, remove comments on next 2 lines
// $message .= "--\r\n"; //Signature delimiter
// $message .= "Birthday reminder copylefted by public domain";
// additional header pieces for errors, From cc's, bcc's, etc
$headers .= "From: $fromname <$fromemail>\n";
$headers .= "X-Sender: <$fromemail>\n";
$headers .= "X-Priority: 1\n"; // Urgent message!
$headers .= "Return-Path: <$fromemail>\n"; // Return path for errors
// If you want to send html mail, uncomment the following line
// $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type
// to use CC, uncomment following line
// $headers .= "cc: [email]email@example.com[/email]\n";
// and now mail it!
mail($recipient, $subject, $message, $headers);
Any help would be appreciated.