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