Advertisement
Guest User

justaguy

a guest
Jul 12th, 2011
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <?
  2. $email = $_POST['email'];
  3. $questions = $_POST['myQuestions'];
  4. // subject
  5. $subject = 'Thanks for the question!';
  6.  
  7. // HTML message
  8. $message = '
  9. <html>
  10. <head>
  11. <title>' . $email . ' sent you a message.</title>
  12. </head>
  13. <body>
  14. <p style="font-size: 19px;">' . $email. '</p>
  15. <p style="font-size: 19px;"> '. $questions .'</p>
  16. </body>
  17. </html>
  18. ';
  19.  
  20. // To send HTML mail, the Content-type header must be set
  21. $headers = 'MIME-Version: 1.0' . "\r\n";
  22. $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  23.  
  24. // Additional headers
  25. $headers .= 'To: <' . $_POST['email'] . '>' . "\r\n";
  26. $headers .= 'From: TEST <test@justaguy.com>' . "\r\n";
  27.  
  28. // Mail it
  29. mail($to, $subject, $message, $headers);
  30.  
  31. //Send them back to the form page with a success message.
  32. header("Location: /justaguy/?question=success")
  33. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement