diff --git a/contacts.php b/contacts.php
index a7b1842..0e4b306 100644
--- a/contacts.php
+++ b/contacts.php
@@ -52,7 +52,10 @@ if ((isset($_POST['envoiquestion']) || isset($_POST['envoiquestion_x'])) && isse
$message=str_replace("\\","",$_POST["question"]);
//envoi des mails
- $headers="From: ".NOMAPPLICATION." <".ADRESSEMAILADMIN.">\r\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: 8bit";
+ $headers="From: ".NOMAPPLICATION." <".ADRESSEMAILADMIN.">\r\nContent-Type: text/plain; charset=\"UTF-8\"\r\nContent-Transfer-Encoding: 8bit";
+ if (isset($_POST['adresse_mail']) && !empty($_POST['adresse_mail']) && validateEmail($_POST['adresse_mail'])) {
+ $headers .= "\r\n".'Reply-To: '.$_POST['adresse_mail'];
+ }
mail (ADRESSEMAILADMIN, "" . _("[CONTACT] You have sent a question ") . "".NOMAPPLICATION, "" . _("You have a question from a user ") . " ".NOMAPPLICATION."\n\n" . _("User") . " : ".$_POST["nom"]."\n\n" . _("User's email address") . " : $_POST[adresse_mail]\n\n" . _("Message") . " :".$message,$headers);
if (isset($_POST['adresse_mail']) && !empty($_POST['adresse_mail']) && validateEmail($_POST['adresse_mail'])) {
$headers="From: ".NOMAPPLICATION." <".ADRESSEMAILADMIN.">\r\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: 8bit";
@@ -122,6 +125,10 @@ framanav();
echo '
'."\n";
echo _("Your email address ") .' :
'."\n";
echo ''."\n";
+
+ if ((isset($_POST['envoiquestion']) || isset($_POST['envoiquestion_x'])) && empty($_SESSION["adresse_mail"]) === false && validateEmail($_SESSION["adresse_mail"]) === false) {
+ echo ' '. _("The address is not correct!") .'';
+ }
echo '
';
@@ -133,9 +140,7 @@ framanav();
}
echo '
'."\n";
- echo '
'. _("Send your question") .' |