Browse Source

inclure conf

dev
Samuel VERMEULEN 3 years ago
parent
commit
463ecc5fc7
  1. 22
      mail/mail.php

22
mail/mail.php

@ -0,0 +1,22 @@
<?php
// Check for empty fields
if(empty($_POST['name']) ||
empty($_POST['email']) ||
empty($_POST['phone']) ||
empty($_POST['message']) ||
!filter_var($_POST['email'],FILTER_VALIDATE_EMAIL))
{
echo "No arguments Provided!";
return false;
}
$name = strip_tags(htmlspecialchars($_POST['name']));
$email_address = strip_tags(htmlspecialchars($_POST['email']));
$phone = strip_tags(htmlspecialchars($_POST['phone']));
$message = strip_tags(htmlspecialchars($_POST['message']));
//envoi
require_once('conf.php');
mail($to,$email_subject,$email_body,$headers);
return true;
?>