Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Configure The Display Of An Email Via Form Mailer
cottoneye1256
post Jul 26 2007, 08:34 PM
Post #1


Newbie
*

Group: Members
Posts: 1
Joined: 26-July 07
Member No.: 47,021



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.
Go to the top of the page
 
+Quote Post
jlhaslip
post Jul 27 2007, 03:14 AM
Post #2


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 4,077
Joined: 24-July 05
From: Linix, DOS and Windows…the good, the bad and the ugly
Member No.: 9,787
Spam Patrol



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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Free Windowsxp Sp2 Cd From Microsoft(13)
  2. Problems With Outlook Express(7)
  3. Verifying Email Addresses(9)
  4. Sending + Receiving Email Via Telnet(10)
  5. Have Diferences Of Performance Form Ps2 Full Console To Mini-ps2?(8)
  6. Get 30 Gb Email For Free(31)
  7. What Is A Computer Form Factor(1)
  8. Php Ftp Upload Form(1)
  9. What Do You Thinks Of This Email(12)
  10. Spam Is 30 Years Old May 3, 2008(13)
  11. Halliluya! I'm Either Rich....(5)
  12. Perl For Automated Web Form Search(1)
  13. Suggestion About Email Notification(1)
  14. Do You Have Mail?(6)
  15. Slightly Concerned About Web Hosting Applications(7)
  1. Design A Contact Form In Flex Part 1(0)
  2. My Application Confirmation Email [resolved](3)
  3. Destination Address For "submit" Button(5)
  4. Text Size In "fill-in" Form Blanks(2)
  5. About Posting Form(2)
  6. How To Use A Database For Chess Results?(0)
  7. Design A Contact Form In Flex Part 2(0)
  8. Trap17 Email Spam Scam - Warning(12)
  9. A Question About Php Mail(1)
  10. What Does Outlook 2007 Junk Email Filter Regard As Junk(0)
  11. Design A Contact Form In Flex Part 3(2)
  12. Firefox And Ie: Table Layouts Look Different In Us!(3)
  13. Submitting A Form In Flex (follow Up Of Sm's Tut)(2)


 



- Lo-Fi Version Time is now: 7th October 2008 - 10:09 PM