Hello,
In certain cases the email that is sent by my processing form is not displayed in HTML and is displayed as html code. For example Gmail and some other email clients such as outlook and outlook express do not display the email in html but rather show the html code. The people who are having trouble viewing the email have HTML enabled for email. Here is the processing code for the form that I use to send the email. Can someone please help and let me know how I can fix this script so everyone can view it in HTML??
<?php
session_start();
@extract($_POST);
$companyName = stripslashes($companyName);
$contactPerson = stripslashes($contactPerson);
$address = stripslashes($address);
$email = stripslashes($email);
$phone = stripslashes($phone);
$Q1 = stripslashes($Q1);
$Q2 = stripslashes($Q2);
$Q4 = stripslashes($Q4);
$Q5 = stripslashes($Q5);
$Q6 = stripslashes($Q6);
$Q7 = stripslashes($Q7);
$Q8 = stripslashes($Q8);
$Q9 = stripslashes($Q9);
$Q10 = stripslashes($Q10);
$Q11 = stripslashes($Q11);
$Q12 = stripslashes($Q12);
$Q13 = stripslashes($Q13);
$Q14 = stripslashes($Q14);
$Q15 = stripslashes($Q15);
$Q16 = stripslashes($Q16);
$Q3 = stripslashes($Q3);
$txtNumber = stripslashes($txtNumber);
$comments = stripslashes($comments);
// Subjects of csfluxer survey
$subject = "Solder Recovery Qualification / Information Request Form";
// Emailed to the following addresses
$emailTo = "evs@sono-tek.com,vwhipple@sono-tek.com,dwilson@sono-tek.com,simon@evsinternational.com";
// Body of email
$body = "<html><body>";
$body .= "<b>Company Name:</b> $companyName<br />
<b>Contact Person:</b> $contactPerson<br />
<b>Address:</b> $address<br />
<b>Email:</b> $email<br />
<b>Telephone:</b> $phone<br />
<b>1.Number of wave solder machines?</b><br />
$Q1<br />
<b>2. What type of machines?</b><br />
$Q2<br />
<b>3. Average weight of one normal dedross?</b><br />
$Q3<br />
<b>4.From the wave that makes the most dross, what is the maximum amount of dross taken
off in one full dedross?(Take an empty dross bucket and dedross one normal full dedross
into the empty bucket and weigh it)</b><br />
$Q4<br />
<b>5. How many times a day do you dedross? (on average)</b><br />
$Q5<br />
<b>6. How many shifts per day?</b><br />
$Q6<br />
<b>7. How many days per week?</b><br />
$Q7<br />
<b>8. How much solder do you buy each month?</b><br />
$Q8<br />
<b>9. How much do you pay per pound for your solder?</b><br />
$Q9<br />
<b>10. How much dross credit (If Any) do you recieve per LB for your Dross?</b><br />
$Q10<br />
<b>11. What alloy(s) do you use?</b><br />
$Q11<br />
<b>12. Expected date to switch to lead-free solder?</b><br />
$Q12<br />
<b>13. Do you solder in an inert atmosphere?</b><br />
$Q13<br />
<b>14. Do you use dross suppressants?</b><br />
$Q14<br />
<b>15. What type(s) of flux do you use (product name and number)?</b><br />
$Q15<br />
<b>16. What type of fluxing equipment do you use?</b><br />
$Q16<br />
<b></b><br />
$comments<br />";
$body .="</body></html>";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: $contactPerson <$email>";
if (isset($_POST['txtNumber'])) {
$number = $_POST['txtNumber'];
if (md5($number) == $_SESSION['image_random_value']) {
// who to mail to
mail($emailTo,$subject,$body,$headers);
header("location:http://www.sprayfluxing.com/info/thanks.html");
exit;
} else {
echo "<font color=red>THE VALIDATION NUMBER YOU ENTERED IS INCORRECT, PLEASE USE THE BACK BUTTON ON THE BROWSER WINDOW TO GO BACK AND ENTER THE CORRECT NUMBER, THANK YOU.</font>";
}
}
?>
Thanks
Antoni