Posted By

onefastsnail on 05/24/12


Tagged


Versions (?)

enquiry email


 / Published in: PHP
 

  1. // Set Headers
  2. $headers = 'MIME-Version: 1.0' . "
  3. ";
  4. $headers .= 'Content-type: text/html; charset=iso-8859-1' . "
  5. ";
  6. $headers .= 'FROM: "' . $from_address .'" <' . $from_address .'>' . "
  7. ";
  8.  
  9. // Recipients Email Address
  10. //$to = "[email protected]"; //testing
  11.  
  12. // Email Contents
  13. $subject = "New Enquiry from ".$_POST["name"];
  14. $body = "<div style='font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#333333;'>
  15. <table width='680px' border='0' cellspacing='5' cellpadding='5' align='center' style='font-size:12px;'>
  16. <tr>
  17. <td align='left' colspan='2'>
  18. <img src='".$siteroot."/images/chat_logo.png' alt='logo' />
  19. </td>
  20. </tr>
  21. <tr>
  22. <td width='150px'>Fullname</td>
  23. <td>". $_POST["name"] . "</td>
  24. </tr>
  25. <tr>
  26. <td width='150px'>Email</td>
  27. <td>". $_POST["email"] . "</td>
  28. </tr>
  29. <tr>
  30. <td width='150px'>Organisation</td>
  31. <td>". $_POST["organisation"] . "</td>
  32. </tr>
  33. <tr>
  34. <td width='150px'>Job Title</td>
  35. <td>". $_POST["job_title"] . "</td>
  36. </tr>
  37. <tr>
  38. <td width='150px'>Address</td>
  39. <td>". $_POST["address1"] . "<br /> ".$_POST["address2"]."<br />".$_POST["town"]." ".$_POST["postcode"]."</td>
  40. </tr>
  41. <tr>
  42. <td width='150px'>Phone Number</td>
  43. <td>". $_POST["telephone"] . "</td>
  44. </tr>
  45. <tr>
  46. <td width='150px'>Referred</td>
  47. <td>". $_POST["referral"] . "</td>
  48. </tr>
  49. <tr>
  50. <td width='150px'>Enquiry</td>
  51. <td>". nl2br($_POST["message"]) . "</td>
  52. </tr>
  53. </table>
  54. </div>";
  55.  
  56. mail($to,'New Chat Marketing Enquiry',$body,$headers);

Report this snippet  

You need to login to post a comment.