When I send an HTML message using the mail() function in php4, the end of my body text is sometimes cut off.
Here is the email code:
$sendto = $email;
$subject = "STL Property Search";
$message = "<html><BODY>" .
"Here are the details of your property search.<BR><BR>" .
"USER DETAILS<BR><HR>" .
"Contact Name: $ContactName<br>" .
"Reference: $ClientRef<br>" .
"Firm: $Firm<br>" .
"DX Number: $DXNo<br>" .
"Address: $Address<br>" .
"Town: $Town<br>" .
"County: $County<br>" .
"Postcode: $Postcode<br>" .
"Phone: $Phone<br>" .
"Fax: $Fax<br>" .
"<BR><BR>PROPERTY DETAILS<BR><HR>" .
"House Number / Name / Occupant: $House<br>" .
"Street: $Street<br>" .
"Area: $Area<br>" .
"Town: $Town<br>" .
"County: $County<br>" .
"Postcode: $Postcode<br>" .
"Purchaser: $Purchaser<br>" .
"Otherinfo: $Otherinfo<br>" .
"<BR><BR>COST BREAKDOWN<BR><HR>" .
"Coal Mining Search = £$coal_search<br>" .
"Council= $personal_search<br>" .
"Council Fee= £$EXprl<br>" .
"Next Day Personal Search= £$official_fee<br>" .
"Environment Report= $environment1<br>" .
"Environment Fee= £$environment_fee<br>" .
"Premium 4 Hour Environment Report= £$enviro_prem<br>" .
"Drainage Fee<br>" .
"$drainage= £$drainage_fee<br>" .
"Premium Drainage Search $drainage_prem<br>" .
"TOTAL FEE= £$total_fee<br>" .
"<BR><BR>PAYMENT DETAILS<BR><HR>" .
"Payment Type: $paymenttype<br>" .
"Creditcard Number: $ccnumber<br>" .
"Creditcard Expiry Date: $ccexpiry<br>" .
"Creditcard Holder: $ccholder<br>" .
"Creditcard Registered Address: $ccaddress<br>" .
"<br>" .
"Thankyou for your business with Me." .
"</body></html>";
mail($sendto, $subject, $message, "Content-type: text/html; charset=iso-8859-1");
It then (in the resultant email) cuts the message off at the payment details part and doesn't show the rest of the message (ie. the rest of the payment details stuff and the thankyou message).
Does anyone know how to get round this problem or what it is caused by?