Guest User

Untitled

a guest
Aug 16th, 2018
549
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. HTML e-mail with PHP
  2. mail( "theresa.pert@me.com", "VoH Online Enquiry",
  3. "Name: $name.</p>, Telephone Number: $telephone, Tour Date: $date, No in Party: $party, Message: $message","From: $email");
  4.  
  5.  
  6. <?php
  7. $email = $_REQUEST['email'] ;
  8. $name = $_REQUEST['name'] ;
  9. $telephone = $_REQUEST['telephone'] ;
  10. $date = $_REQUEST['date'] ;
  11. $party = $_REQUEST['party'] ;
  12. $message = $_REQUEST['message'] ;
  13.  
  14.  
  15. if (!isset($_REQUEST['email'])) {
  16. header( "Location: ../contact.shtml" );
  17. }
  18. elseif (empty($email) || empty($message)) {
  19. header( "Location: ../contact-error.shtml" );
  20. }
  21. else {
  22. mail( "theresa.pert@me.com", "VoH Online Enquiry",
  23. "Name: <p>$name</p> <p>Telephone Number: $telephone</p> <p>Tour Date: $date</p> <p>No in Party: $party</p><p>Message: $message</p>","From: $email");
  24. header( "Location: ../contact-thankyou.shtml" );
  25. }
  26. ?>
  27.  
  28. $headers = "Reply-To: .... <mail@blabla.blabla>rn";
  29. $headers .= "Return-Path: .... <mail@blabla.blabla>rn";
  30. $headers .= "From: .... <mail@blabla.blabla>rn";
  31. $headers .= "Organization: .... <mail@blabla.blabla>rn";
  32. $headers .= "Content-Type: text/htmlrn";
  33. mail($email, $object, $text, $headers);
Add Comment
Please, Sign In to add comment