Created
April 18, 2017 13:56
-
-
Save BluePraise/15d658e9b5f1c63cee10dd42f72620b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sendto = "email@email.com"; | |
$subject = "Email from Your Website"; | |
$name = $_POST['name']; | |
$email = $_POST['email']; | |
$project = $_POST['project']; | |
$message = $_POST['message']; | |
// Header | |
$headers = "From: Boo!" . strip_tags($usermail) . "\r\n"; | |
$headers .= "Reply-To: ". strip_tags($usermail) . "\r\n"; | |
$headers .= "MIME-Version: 1.0\r\n"; | |
$headers .= "Content-Type: text/html;charset=utf-8 \r\n"; | |
// Body | |
$msg = "<html><body style='font-family:Arial,sans-serif;'>"; | |
$msg .= "<h2 style='font-weight:bold;border-bottom:1px dotted #ccc;'>$subject</h2>\r\n"; | |
$msg .= "<p><strong>Name: </strong> ".$name."</p>\r\n"; | |
$msg .= "<p><strong>Email: </strong> ".$email."</p>\r\n"; | |
$msg .= "<p><strong>Project: </strong> ".$project."</p>\r\n"; <<<<<----- I added this | |
$msg .= "<p><strong>Message: </strong> ".$message."</p>\r\n"; | |
$msg .= "</body></html>"; | |
// send | |
if(@mail($sendto, $subject, $msg, $headers)){ | |
$_POST['hidden'] = ""; | |
echo "true"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment