dc_jt Posted June 30, 2007 Share Posted June 30, 2007 Hi I want to format the following so that each heading is in bold how would I do that: Also I want to add a title at the beginning (where I have put TITLE HERE) $message = 'The following information has been submitted through the contact form:'."\n"."\n". (TITLE HERE) 'Type of Enquiry: ' .$enquiry_type."\n". 'Title: ' .$title."\n". 'First Name: ' .$first_name."\n". 'Surname: ' .$surname."\n". 'Email: '.$email."\n". 'Address: '.$address."\n". 'City/Town: '.$city_town."\n". 'County: '.$county."\n".'Postcode: '.$postcode."\n". 'Telephone: '.$telephone."\n". 'Mobile: '.$mobile."\n". 'Telephone: '.$telephone."\n". 'How did you hear about us?: '.$heard_from."\n". 'Areas of Interest: '.$areas_of_interest[0].$areas_of_interest[1].$areas_of_interest[2].$areas_of_interest[3].$areas_of_interest[4]. 'Enquiry: '.$enquiry."\n". 'E-News Signup: '.$newsletter; Thanks Quote Link to comment Share on other sites More sharing options...
Link Posted June 30, 2007 Share Posted June 30, 2007 You can add the code <b>TEXT</b> directly into the quotes for the titles, but then you have to change the headers of the email so that it knows it is HTML. I use the following function (which you pass $message to): <?php function sendmail($to,$subject,$pagetext,$from="noreply@domain.com") { $headers = ""; mail($to,$subject,$pagetext,"From: $from\nReply-To: $from\nX-Mailer: PHP/".phpversion()."\nContent-type: text/html"); } ?> Hope that helps. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.