This commit is contained in:
Bertrand 2012-05-22 11:18:26 +02:00
parent d439ea13ab
commit 87604f4cd7

View File

@ -1,7 +1,16 @@
<?php <!DOCTYPE html>
<html>
<head>
<meta charset="utf8" />
</head>
<body>
<?php
error_reporting(E_ALL);
define("FILENAME", "questions_file.nemubot"); define("FILENAME", "questions_file.nemubot");
include("Question.class.php"); include("Question.class.php");
include("QuestionsFile.class.php"); include("QuestionsFile.class.php");
@ -42,17 +51,17 @@ if (isset ($_POST['send']))
// @TODO: Send mail to the selected validator // @TODO: Send mail to the selected validator
/* This code works, perhaps should be placed in a method in Question class? /* This code works, perhaps should be placed in a method in Question class?
$to = "bertrand.cournaud@gmail.com"; $to = "bertrand.cournaud@gmail.com";
$subject = "[Nemubot] Validation d'une question"; $subject = "[Nemubot] Validation d'une question";
$headers = "From: Nemubot <bot@nemunai.re>"; $headers = "From: Nemubot <bot@nemunai.re>";
$message = "Bonjour,\n"; $message = "Bonjour,\n";
if (mail($to, $subject, $message, $headers)) if (mail($to, $subject, $message, $headers))
{ {
echo ("Email sent"); echo ("Email sent");
} }
else else
echo ("Error with the email"); echo ("Error with the email");
//*/ //*/
} }
} }
@ -60,3 +69,6 @@ else
header("Location: ./"); header("Location: ./");
?> ?>
</body>
</html>