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

Report this snippet  

You need to login to post a comment.