Files
float-www/public/assets/php/commentForm.php
T
DESKTOP-GBA0BK8\Admin 096a2f3825 first commit
2023-03-18 14:16:08 -04:00

25 lines
620 B
PHP

<?
$name = $_REQUEST["name"];
$email = $_REQUEST["email"];
$msg = $_REQUEST["msg"];
$to = "dsathemes@gmail.com";
if (isset($email) && isset($name) && isset($msg)) {
$email_subject = "This message was sent via NordEx (Comment Form)";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= "From: ".$name." <".$email.">\r\n"."Reply-To: ".$email."\r\n" ;
$msg = "From: $name<br/> Email: $email <br/> Message: $msg";
$mail = mail($to, $email_subject, $msg, $headers);
if($mail)
{
echo 'success';
}
else
{
echo 'failed';
}
}
?>