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 ''."\n"; - echo ''."\n"; - echo '
'. _("Send your question") .'
'."\n"; + echo ''; echo '


'."\n"; echo ''."\n"; echo ''."\n"; diff --git a/locale/fr_FR/LC_MESSAGES/Studs.mo b/locale/fr_FR/LC_MESSAGES/Studs.mo index 1c90d14..b4a2568 100644 Binary files a/locale/fr_FR/LC_MESSAGES/Studs.mo and b/locale/fr_FR/LC_MESSAGES/Studs.mo differ diff --git a/locale/fr_FR/LC_MESSAGES/Studs.po b/locale/fr_FR/LC_MESSAGES/Studs.po index 4251b44..37036f6 100644 --- a/locale/fr_FR/LC_MESSAGES/Studs.po +++ b/locale/fr_FR/LC_MESSAGES/Studs.po @@ -738,6 +738,10 @@ msgstr "Votre nom" msgid "Your email address " msgstr "Votre adresse électronique " +#: contacts.php:127 +msgid "The address is not correct!" +msgstr "L'adresse saisie n'est pas correcte !" + #: contacts.php:129 msgid "Question" msgstr "Question"