Fix issue #17 : ajout d'un reply-to + vérification adresse mail + mise en forme
This commit is contained in:
parent
90d8e1c6d0
commit
030051921b
13
contacts.php
13
contacts.php
@ -52,7 +52,10 @@ if ((isset($_POST['envoiquestion']) || isset($_POST['envoiquestion_x'])) && isse
|
|||||||
$message=str_replace("\\","",$_POST["question"]);
|
$message=str_replace("\\","",$_POST["question"]);
|
||||||
|
|
||||||
//envoi des mails
|
//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);
|
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'])) {
|
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";
|
$headers="From: ".NOMAPPLICATION." <".ADRESSEMAILADMIN.">\r\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: 8bit";
|
||||||
@ -123,6 +126,10 @@ framanav();
|
|||||||
echo _("Your email address ") .' :<br>'."\n";
|
echo _("Your email address ") .' :<br>'."\n";
|
||||||
echo '<input type="text" size="40" maxlength="64" name="adresse_mail" value="'.$_SESSION["adresse_mail"].'">'."\n";
|
echo '<input type="text" size="40" maxlength="64" name="adresse_mail" value="'.$_SESSION["adresse_mail"].'">'."\n";
|
||||||
|
|
||||||
|
if ((isset($_POST['envoiquestion']) || isset($_POST['envoiquestion_x'])) && empty($_SESSION["adresse_mail"]) === false && validateEmail($_SESSION["adresse_mail"]) === false) {
|
||||||
|
echo ' <font color="#FF0000">'. _("The address is not correct!") .'</font>';
|
||||||
|
}
|
||||||
|
|
||||||
echo '<br><br>';
|
echo '<br><br>';
|
||||||
|
|
||||||
echo _("Question") .' :<br>'."\n";
|
echo _("Question") .' :<br>'."\n";
|
||||||
@ -133,9 +140,7 @@ framanav();
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo '<br><br><br>'."\n";
|
echo '<br><br><br>'."\n";
|
||||||
echo '<table>'."\n";
|
echo '<button type="submit" name="envoiquestion" value="'._("Send your question").'" class="button green poursuivre" alt="'._("Send your question").'"><strong>'._("Send your question").'</strong></button>';
|
||||||
echo '<tr><td>'. _("Send your question") .'</td><td><input type="image" name="envoiquestion" value="Envoyer votre question" src="images/next-32.png"></td></tr>'."\n";
|
|
||||||
echo '</table>'."\n";
|
|
||||||
echo '<br><br><br>'."\n";
|
echo '<br><br><br>'."\n";
|
||||||
echo '</div>'."\n";
|
echo '</div>'."\n";
|
||||||
echo '</form>'."\n";
|
echo '</form>'."\n";
|
||||||
|
Binary file not shown.
@ -738,6 +738,10 @@ msgstr "Votre nom"
|
|||||||
msgid "Your email address "
|
msgid "Your email address "
|
||||||
msgstr "Votre adresse électronique "
|
msgstr "Votre adresse électronique "
|
||||||
|
|
||||||
|
#: contacts.php:127
|
||||||
|
msgid "The address is not correct!"
|
||||||
|
msgstr "L'adresse saisie n'est pas correcte !"
|
||||||
|
|
||||||
#: contacts.php:129
|
#: contacts.php:129
|
||||||
msgid "Question"
|
msgid "Question"
|
||||||
msgstr "Question"
|
msgstr "Question"
|
||||||
|
Loading…
Reference in New Issue
Block a user