cottoneye1256 0 Report post Posted July 26, 2007 I set up an form mailer which emails data to a company that a customer fills out, that works fine. What I want is change the way the email looks so it's not so plain ex: change the size and color of fonts of the data, add background color, add company logo.... below is the code I wrote that emails customers data, from, to, subject info: <?php //start building the mail string $msg .="A free estimate has been requested from mywebsite.com;; $msg2 .="Thank you for requesting a free estimate. A specialist will contact you within 24 hrs.\n\n"; $msg2 .="You are receiving this email because you signed up for a free pest estimate from mywebsite.com.;; $msg2 .="Please do not reply to this e-mail. This message came from an automated mailbox.\n\n"; $msg2 .="Ace Plumbing (555)555-555\n\n"; $msg .= "FIRST NAME: $_POST[name]\n"; $msg .= "LAST NAME: $_POST[last]\n"; $msg .= "ADDRESS: $_POST[address]\n"; $msg .= "ADDRESS 2: $_POST[address2]\n"; $msg .= "CITY: $_POST[city]\n"; $msg .= "ZIP CODE: $_POST[zip]\n"; $msg .= "HOME PHONE: $_POST[homefone]\n"; $msg .= "ALTERNATE PHONE: $_POST[altfone]\n"; $msg .= "E-MAIL: $_POST[email]\n"; $msg .= "PREFERRED CONTACT: $_POST[preferred_contact]\n"; $msg .= "PROBLEM: $_POST[stateDropDown]\n"; $msg .= "MESSAGE: $_POST[message]\n"; $msg .= "NOTIFIED ABOUT FUTURE OFFERS: $_POST[notify_future_offers]\n"; $msg .= "\n"; //set up the mail $recipient = "company@name.com"; $recipient2 = "$_POST[email]"; $subject = "Free Estimate Requested"; $mailheaders = "From: ace-plumbing.com<estimate@ace.com> \n"; $mailheaders .= "Reply-To: $_POST[email]\n\n"; //send the mail mail($recipient, $subject, $msg, $mailheaders); mail($recipient2, $subject, $msg2, $mailheaders); //end of PHP code ?> Notice from Plenoptic: Make sure to use BBcode tags when you are posting codes. Review the Xisto ReadMe to learn all the forum guidelines. Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted July 27, 2007 The php.net Manual has information about the use of the mail() to send html emails. By sending the Additional header to modify the mime type this is easily done.Check out the last example on this link: http://ca.php.net/function.mail Share this post Link to post Share on other sites