Jul 26, 2008

Configure The Display Of An Email Via Form Mailer

Free Web Hosting, No Ads > CONTRIBUTE > The Internet > Web Design

free web hosting

Configure The Display Of An Email Via Form Mailer

cottoneye1256
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:
CODE
<?php
//start building the mail string
$msg .="A free estimate has been requested from www.mywebsite.com\n\n";
$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 www.mywebsite.com.\n";
$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 [code] BBcode tags when you are posting codes. Review the Trap17 ReadMe to learn all the forum guidelines.

 

 

 


Reply

jlhaslip
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

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : configure display email mailer

  1. A Small Html Problem - How to display foreign characters correctly when designing a site. (4)
    I was wondering how I could solve a small problem. I was told that some people see accented and
    umlauted letters (such as " é " and " ë ") as question marks (" ? ") on my website. I come across
    the same thing sometimes when looking at websites which use non-English characters. Funnily enough,
    the other day, I looked at a site and the apostrophy ( ' ) was also shown as a question mark.
    That is a very common character usually, I would think. I thought it had something to do with the
    character encoding settings, and let me also mention I use Mozilla Firefox as my brows...
  2. Php Email System - (5)
  3. Ie 6 Display Problem - unexpected background color (5)
    Hi guys, I have just tested my site with IE6 and there seems to be some rendering problems:
    http://www.rosemarysmediation.com/index.php?page=home All of that aqua color should be black as
    you can see in firefox. Any help or suggestions would be greatly appreciated. Cheers /smile.gif"
    style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />...
  4. How To Configure Ipb Portal - (2)
    Hiya ppl /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Im the
    owner of an IPB site much like this one, and i was wondering, how do you make it so it displays
    certain posts, like the portal for this forum? ATM it just looks like this, no posts at all, u can
    only see the calendar and the rest of the left-hand sidebars
    http://www.gerudo.trap17.com/forum/upload/index.php?act=home (im on low creds atm, so if it doesnt
    show up check again in an hour or so, should have made enough posts by then /wink.gif"
    style="vertical-align:middle" ...



Looking for configure, display, email, form, mailer

Searching Video's for configure, display, email, form, mailer
advertisement



Configure The Display Of An Email Via Form Mailer



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE