I know these are supposed to be short, but I'm afraid I have to put my code on here to try and find out what's wrong.
I have a Collateral Order Form, and the script below is what generates and sends the e-mail. However, the emails that I receive have these randome exclaimation points with a line break afterwards. If you would like to see the form, and get a copy of the results of the form, please visit http://www.tdh-marketing.com/moyno/index2.php. I turned off the error checking, and the results are coming to me for now. The exclaimation marks seem to come in no discernable order. They might be several hundered characters apart, or just a few. It makes no sense! Please help!! Here's my code:
$headers = "";
$message = "";
$subject = "";
$recipient = "shaun@tdh-marketing.com";
/* subject */
$subject = "MOYNO : Collateral Order";
$headers .= "From:".$E_mail."\n";
$headers .= "cc:".$E_mail."\n";
$headers .= "X-Sender: ".$E_mail."\n";
$headers .= "X-Mailer: PHP\n";
$headers .= "X-Priority: 1\n";
$headers .= "Return-Path: ".$E_mail."\n";
/* If you want to send html mail, uncomment the following line */
$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type
// $headers .= "cc:birthdayarchive@php.net\n"; // CC to
// $headers .= "bcc:birthdaycheck@php.net, birthdaygifts@php.net\n"; // BCCs to
$message .= "<x-html>\n";
$message .= "\n";
$message .= "<head>\n";
$message .= "<title>Your WaddleSnout Account Information</title>\n";
$message .= "</head>\n";
$message .= "<body>\n";
// Contact Fields
$message .= "===================================================<br>"
."<br>"
."<FONT face=Arial><b>The following was submitted by:</b></font><br>"
."<br>"
."<FONT face=Arial><em>Name :</em> ".$realname."</font><br>"
."<FONT face=Arial><em>Company :</em> ".$company."</font><br>"
."<FONT face=Arial><em>Address :</em> ".$Address1."</font><br>";
if ($Address2 != "") {
$message .= "<FONT face=Arial><em></em> ".$Address2."</font><br>";
}
$message .= "<FONT face=Arial><em>City :</em> ".$City."</font><br>"
."<FONT face=Arial><em>State :</em> ".$State."</font><br>"
."<FONT face=Arial><em>Zip/Postal Code :</em> ".$Zip_Postal_Code."</font><br>"
."<FONT face=Arial><em>Country :</em> ".$country."</font><br>"
."<FONT face=Arial><em>Phone :</em> ".$Phone."</font><br>"
."<FONT face=Arial><em>Fax :</em> ".$Fax."</font><br>"
."<FONT face=Arial><em>E-Mail :</em> <a href='mailto:$E_mail'>".$E_mail."</a></font><br>"
."<FONT face=Arial><em>Date :</em> ".$Date."</font><br>"
."<br>"
."<FONT face=Arial><b>Order Contains:</b></font><br><br>";
// Counting / Printing Variables to e-mail
$var_count = count($HTTP_POST_VARS);
if($var_count > 0) {
reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
if($val != "" AND ereg("PR_", $key)) {
$key = ereg_replace("PR_", "", $key);
$key = ereg_replace("_", " ", $key);
$key = ucwords($key);
$message .= "<FONT face=Arial>($val) $key</font><br>";
}
}
}
if($Other_Box_1 != "" AND $Other1 != "") {
$message .= "<FONT face=Arial>($Other_Box_1) $Other1</font><br>";
}
if($Other_Box_2 != "" AND $Other2 != "") {
$message .= "<FONT face=Arial>($Other_Box_2) $Other2</font><br>";
}
if($Other_Box_3 != "" AND $Other3 != "") {
$message .= "<FONT face=Arial>($Other_Box_3) $Other3</font><br>";
}
if($Other_Box_4 != "" AND $Other4 != "") {
$message .= "<FONT face=Arial>($Other_Box_4) $Other4</font><br>";
}
if($Other_Box_5 != "" AND $Other5 != "") {
$message .= "<FONT face=Arial>($Other_Box_5) $Other5</font><br>";
}
$message .= "</body>\n";
$message .= "\n";
$message = StripSlashes($message);
$message = ereg_replace("! ", "", $message);
mail($recipient, $subject, $message, $headers);