diff --git a/questions.php b/questions.php index b659b4c..15ae8ce 100755 --- a/questions.php +++ b/questions.php @@ -16,7 +16,16 @@ if (isset ($_POST['send'])) echo 'La question est : ' . $question . "
"; echo 'La réponse est : ' . $answer; - mail('bertrand.cournaud@gmail.com', 'Nemubot', 'Ceci est un test'); + $to = "bertrand.cournaud@gmail.com"; + $subject = "Nemubot"; + $message = "Ceci est un test"; + + if (mail($to, $subject, $message)) + { + echo ("Email sent"); + } + else + echo ("Error with the email"); } }