From 2d4de36df02a51969ea5f7fdb047a185f2a8486c Mon Sep 17 00:00:00 2001 From: Bertrand Cournaud Date: Mon, 21 May 2012 17:19:32 +0200 Subject: [PATCH] Email --- questions.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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"); } }