chop Posted August 22, 2014 Share Posted August 22, 2014 All my php generated emails look like they're 6 pixels high and, man, are they ugly. Can anyone tell me how to add some size, fonts, color etc? Here's a sample of my code: $body = "Name: {$_POST['name']}\n\nEmail: {$_POST['email']}\n\n Telephone: {$_POST['phone']}\n\n Comments: {$_POST['comments']}\n\n Checked Boxes:\n\n {$checks}"; // Make it no longer than 70 characters long: $body = wordwrap($body, 70); $from="Collaboration Age, Website Mail"; mail('chop@myfairpoint.net', 'Contact Form Submission', $body, "From: {$from}"); // A message is printed on the first panel of this website // that the email has been sent // Clear $_POST (so that the form's not sticky): $_POST = array(); thank you Link to comment Share on other sites More sharing options...
Larry Posted August 22, 2014 Share Posted August 22, 2014 You actually need to generate and send HTML email to format it better. What mail() sends by default is plain text. You'll need to search online for sending HTML email using PHP. It's nearly impossible on its own, so you'll want to find a good third-party library to tap into. Link to comment Share on other sites More sharing options...
chop Posted August 22, 2014 Author Share Posted August 22, 2014 Thanks, Larry. I didn't realize it was so involved. I've decided I can live without it. chop Link to comment Share on other sites More sharing options...
Recommended Posts