GingerNut
Oct 3rd, 2002, 02:18 PM
Hi guys,
I have a set of php scripts which are used for a show/movie database. There is a reservation form which then sends an email to the Box Office. The problem is, the box office uses StarOffice for their email and for some reason, which I don't know, the email is coming through as gobbledygook. Here is the bit of code that sends the email:
function send_email() // sends email
{
global $name_title_, $name_, $address_, $city_, $country_, $zip_, $home_phone_, $work_phone_, $email_, $contact_method_, $contact_method2_, $contact_method3_, $movies_, $number_of_tickets_, $seating_type_, $main_message_, $tickets_, $credit_card_payment_, $price_;
global $qft1_days;
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$now = date("m/d/Y, D h:i a"); // gets the date/time now
$message=" <html> <head> </head>
<body>
<b><font color=\"#000099\">A NEW RESERVATION</b> <BR>
<b><font color=\"#000099\">$now</b></font><BR>
<BR align=\"left\"><i><b><font color=\"#000099\">Customer's info:</b></i>
<BR align=\"left\"> <font color=\"#000099\"><b>Name:</b></font> $name_title_ $name_
<BR align=\"left\"> <font color=\"#000099\"><b>Address:</b></font> $address_
<BR align=\"left\"> <font color=\"#000099\"><b>City:</b></font> $city_
<BR align=\"left\"> <font color=\"#000099\"><b>County:</b></font> $country_
<BR align=\"left\"> <font color=\"#000099\"><b>Postcode:</b></font> $zip_
<BR align=\"left\"> <font color=\"#000099\"><b>Home Phone:</b></font> $home_phone_
<BR align=\"left\"> <font color=\"#000099\"><b>Work Phone:</b></font> $work_phone_
<BR align=\"left\"> <font color=\"#000099\"><b>E-mail:</b></font> $email_
<BR align=\"left\"> <font color=\"#000099\"><b>Contact method:</b></font> $contact_method_ $contact_method2_ $contact_method3_
<BR align=\"left\"> <font color=\"#000099\"><b>Message:</b></font> $main_message_
<BR><BR align=\"left\"><b><i><font color=\"#000099\">Reservation info:</font></i></b>
<BR align=\"left\"> <font color=\"#000099\"><b>Show:</b></font> $movies_
<BR align=\"left\"> <font color=\"#000099\"><b>Number of tickets </b></font> $number_of_tickets_
<BR align=\"left\"> <font color=\"#000099\"><b>Seats types:</b></font> $seating_type_
<BR align=\"left\"> <font color=\"#000099\"><b>Reservation date:</b></font> $qft1_days
</p>
</body>
</html>";
//ncmillar@btinternet.com
//i_stanev2000@yahoo.com
mail("ncmillar@btinternet.com", "Show Reservation", "$message", $headers); // sends an email
}
Could someone please tell me how to change it so that the information goes as straight text rather than html, so that it can be properly read using StarOffice?
I have a set of php scripts which are used for a show/movie database. There is a reservation form which then sends an email to the Box Office. The problem is, the box office uses StarOffice for their email and for some reason, which I don't know, the email is coming through as gobbledygook. Here is the bit of code that sends the email:
function send_email() // sends email
{
global $name_title_, $name_, $address_, $city_, $country_, $zip_, $home_phone_, $work_phone_, $email_, $contact_method_, $contact_method2_, $contact_method3_, $movies_, $number_of_tickets_, $seating_type_, $main_message_, $tickets_, $credit_card_payment_, $price_;
global $qft1_days;
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$now = date("m/d/Y, D h:i a"); // gets the date/time now
$message=" <html> <head> </head>
<body>
<b><font color=\"#000099\">A NEW RESERVATION</b> <BR>
<b><font color=\"#000099\">$now</b></font><BR>
<BR align=\"left\"><i><b><font color=\"#000099\">Customer's info:</b></i>
<BR align=\"left\"> <font color=\"#000099\"><b>Name:</b></font> $name_title_ $name_
<BR align=\"left\"> <font color=\"#000099\"><b>Address:</b></font> $address_
<BR align=\"left\"> <font color=\"#000099\"><b>City:</b></font> $city_
<BR align=\"left\"> <font color=\"#000099\"><b>County:</b></font> $country_
<BR align=\"left\"> <font color=\"#000099\"><b>Postcode:</b></font> $zip_
<BR align=\"left\"> <font color=\"#000099\"><b>Home Phone:</b></font> $home_phone_
<BR align=\"left\"> <font color=\"#000099\"><b>Work Phone:</b></font> $work_phone_
<BR align=\"left\"> <font color=\"#000099\"><b>E-mail:</b></font> $email_
<BR align=\"left\"> <font color=\"#000099\"><b>Contact method:</b></font> $contact_method_ $contact_method2_ $contact_method3_
<BR align=\"left\"> <font color=\"#000099\"><b>Message:</b></font> $main_message_
<BR><BR align=\"left\"><b><i><font color=\"#000099\">Reservation info:</font></i></b>
<BR align=\"left\"> <font color=\"#000099\"><b>Show:</b></font> $movies_
<BR align=\"left\"> <font color=\"#000099\"><b>Number of tickets </b></font> $number_of_tickets_
<BR align=\"left\"> <font color=\"#000099\"><b>Seats types:</b></font> $seating_type_
<BR align=\"left\"> <font color=\"#000099\"><b>Reservation date:</b></font> $qft1_days
</p>
</body>
</html>";
//ncmillar@btinternet.com
//i_stanev2000@yahoo.com
mail("ncmillar@btinternet.com", "Show Reservation", "$message", $headers); // sends an email
}
Could someone please tell me how to change it so that the information goes as straight text rather than html, so that it can be properly read using StarOffice?