<?php

if(isset($_POST['submit'])) {

	$to = "maximeblaszka@gmail.com"; // mpbesnard@sonumerique.fr
	$from = $_POST['email'];

	$nom = $_POST['nom'];
	$sujet = $_POST['sujet'];
	$message = $_POST['message'];

	$headers = "From : " . $from . "\r\n" . "To : " . $to;

	mail($to,$sujet,$message,$headers);

	
	header('Location: index.php'); 
}
?>