SMTPDebug = 0; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'yuno.antopie.org'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'send@antopie.org'; // SMTP username
$mail->Password = $mdp; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to
//Recipients
$mail->setFrom('send@antopie.org', 'Super·F·lux');
$mail->addAddress('cecile+superflux@antopie.org', 'Cécile CHEVALLIER'); // Add a recipient
//$mail->addReplyTo($_POST['email'], $_POST['nom']);
// Content
$mail->CharSet = 'UTF-8';
$mail->isHTML(false);
$mail->Subject = "Message depuis le site Web de Super·F·lux";
$mail->Body = htmlspecialchars(substr($_POST['message'], 0, 20000));
$mail->send();
echo "Le message a bien été envoyé !";
} catch (Exception $e) {
echo "Le message n'a pas pu être envoyé. Mailer Error: {$mail->ErrorInfo}";
}
} else {
echo "Erreur : Captcha invalide !";
}
} else {
echo "ERREUR : Le message fait plus de 10 000 caractères !";
}
}
?>