Advertisement
Guest User

email

a guest
Dec 31st, 2015
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. <?php
  2. $to = "pitchoudev7@gmail.com";
  3. $subject = "HTML email";
  4.  
  5. $message = $_POST["message"];
  6.  
  7. // Always set content-type when sending HTML email
  8. $headers = "MIME-Version: 1.0" . "\r\n";
  9. $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
  10.  
  11. // More headers
  12. $headers .= 'To: Mary <pitchoudev7@gmail.com>' . "\r\n";
  13. $headers .= 'From: <'.$_POST["email"].'>' . "\r\n";
  14. $headers .= 'Cc:pitchoudev7@gmail.com' . "\r\n";
  15. $headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";
  16. mail($to,$subject,$message,$headers);
  17. ?>
  18.  
  19.  
  20. <form class="contact-form" method="post" action="form.php" id="contactForm" novalidate="">
  21. <div class="form-group form-icon-group">
  22. <input class="form-control" name="name" placeholder="Your name *" type="text">
  23. <i class="fa fa-user"></i>
  24. </div>
  25. <div class="form-group form-icon-group">
  26. <input class="form-control" name="email" placeholder="Your email *" type="text">
  27. <i class="fa fa-envelope"></i>
  28. </div>
  29. <div class="form-group form-icon-group">
  30. <textarea class="form-control" name="message" placeholder="Your message" rows="10"></textarea>
  31. <i class="fa fa-pencil"></i>
  32. </div>
  33. <div class="form-group text-center">
  34. <button class="btn btn-primary btn-icon btn-icon-right" type="submit">
  35. Send email
  36. <div class="hex-alt">
  37. <i class="fa fa-envelope"></i>
  38. </div>
  39. </button>
  40. </div>
  41. <div id="messages"></div>
  42. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement