Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $email = $_POST['email'];
- $questions = $_POST['myQuestions'];
- // subject
- $subject = 'Thanks for the question!';
- // HTML message
- $message = '
- <html>
- <head>
- <title>' . $email . ' sent you a message.</title>
- </head>
- <body>
- <p style="font-size: 19px;">' . $email. '</p>
- <p style="font-size: 19px;"> '. $questions .'</p>
- </body>
- </html>
- ';
- // To send HTML mail, the Content-type header must be set
- $headers = 'MIME-Version: 1.0' . "\r\n";
- $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
- // Additional headers
- $headers .= 'To: <' . $_POST['email'] . '>' . "\r\n";
- $headers .= 'From: TEST <test@justaguy.com>' . "\r\n";
- // Mail it
- mail($to, $subject, $message, $headers);
- //Send them back to the form page with a success message.
- header("Location: /justaguy/?question=success")
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement