Fix email for subscription and change style when confirmation
This commit is contained in:
parent
1bdda247a3
commit
65670dd09d
@ -1,9 +1,19 @@
|
||||
<?php
|
||||
|
||||
include("Question.class.php");
|
||||
|
||||
$email = $_GET['email'];
|
||||
$subject = "[Nemubot] Confirmation d'inscription"
|
||||
function mail_utf8($to, $subject = '(No subject)',
|
||||
$message = '', $header = '')
|
||||
{
|
||||
$header_ = 'MIME-Version: 1.0' . "\r\n" .
|
||||
'Content-type: text/plain; charset=UTF-8' . "\r\n";
|
||||
return (mail($to, '=?UTF-8?B?'.base64_encode($subject).'?=',
|
||||
$message, $header_ . $header));
|
||||
}
|
||||
|
||||
|
||||
$email = $_POST['email'];
|
||||
echo $email;
|
||||
$subject = "[Nemubot] Confirmation d'inscription";
|
||||
$headers = "From: Nemubot <bot@nemunai.re>\n";
|
||||
$message = "Bonjour,\n"
|
||||
."Vous avez demandé à être ajouté à la liste des participants "
|
||||
@ -18,9 +28,7 @@ $message = "Bonjour,\n"
|
||||
."Cordialement,\n\n"
|
||||
."-- \nNemubot";
|
||||
|
||||
$question = new Question();
|
||||
|
||||
if ($question->mail_utf8($email, $subject, $message, $headers))
|
||||
if (mail_utf8($email, $subject, $message, $headers))
|
||||
{
|
||||
echo "email sent";
|
||||
}
|
||||
|
@ -25,6 +25,7 @@
|
||||
<h1>Nemubot Questions (BETA)</h1>
|
||||
</div>
|
||||
</header>
|
||||
<section id="introduction">
|
||||
<article id="validate">
|
||||
<h2>Merci de votre participation!</h2>
|
||||
<p>
|
||||
@ -43,6 +44,6 @@
|
||||
<a href="index.html">Proposer une nouvelle question</a>
|
||||
</p>
|
||||
</article>
|
||||
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user