diff --git a/adminstuds.php b/adminstuds.php
index a1e98ad9abf6247600f46dc331aef10cfac1c8e7..45c7c0b3df11693a8ef75820db85e9cb3e48cb2a 100644
--- a/adminstuds.php
+++ b/adminstuds.php
@@ -103,13 +103,7 @@ $dsondage=$sondage->FetchObject(false);
 
 //si la valeur du nouveau titre est valide et que le bouton est activé
 $adresseadmin = $dsondage->mail_admin;
-$headers_str = <<<EOF
-From: %s <%s>
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-EOF;
-$headers = sprintf($headers_str, NOMAPPLICATION, ADRESSEMAILADMIN);
-
+$headers =  makeHeaders() ;
 
 if (isset($_POST["boutonnouveautitre"]) || isset($_POST["boutonnouveautitre_x"])) {
   if(issetAndNoEmpty('nouveautitre') === false) {
@@ -477,7 +471,8 @@ if (isset($_POST["ajoutercolonne_x"]) && issetAndNoEmpty('nouvellecolonne') && (
   $sql = $connect->Prepare($sql);
   if ($connect->Execute($sql, array($nouveauxsujets, $numsondage))) {
     //envoi d'un mail pour prévenir l'administrateur du changement
-    $headers="From: ".NOMAPPLICATION." <".ADRESSEMAILADMIN.">\r\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: 8bit";
+    $headers =  makeHeaders() ;
+
     sendEmail( "$adresseadmin", "" . _("[ADMINISTRATOR] New column for your poll").NOMAPPLICATION, "" .
           _("You have added a new column in your poll. \nYou can inform the voters of this change with this link") .
           " : \n\n".getUrlSondage($numsondage)." \n\n " . _("Thanks for your confidence.") . "\n".NOMAPPLICATION,
diff --git a/contacts.php b/contacts.php
index 3ca5f4835fe77da71055e2c235663b7dc56abc93..ef6c9a3ffda11115106fdabbf28c1d49ed4826f3 100644
--- a/contacts.php
+++ b/contacts.php
@@ -52,13 +52,14 @@ 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\"\r\nContent-Transfer-Encoding: 8bit";
+  $headers =  makeHeaders() ;
+
   if (isset($_POST['adresse_mail']) && !empty($_POST['adresse_mail']) && validateEmail($_POST['adresse_mail'])) {
     $headers .= "\r\n".'Reply-To: '.$_POST['adresse_mail'];
   }
   sendEmail( 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";
+    $headers =  makeHeaders() ;
     sendEmail( "$_POST[adresse_mail]", "" . _("[COPY] Someone has sent a question ") . "".NOMAPPLICATION, "" . _("Here is a copy of your question") . " :\n\n".$message." \n\n" . _("We're going to answer your question shortly.") . "\n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION,$headers );
   }
   
diff --git a/creation_sondage.php b/creation_sondage.php
index 38ae7febd4a062088a2d8e59d4ec9efe335086dd..beb84874101ab75e140d493e333b2be6127c4c09 100644
--- a/creation_sondage.php
+++ b/creation_sondage.php
@@ -82,7 +82,7 @@ function ajouter_sondage()
     $date_fin = time()+15552000;
   }
   
-  $headers="From: ".NOMAPPLICATION." <".ADRESSEMAILADMIN.">\r\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: 8bit";
+  $headers =  makeHeaders() ;
   
   global $connect;
   
diff --git a/fonctions.php b/fonctions.php
index c601097a8b7ccfa21300582fad0cce9d7fd8fea8..1e720fa71d6bca6b9856af57ffbeb9e0560120d3 100644
--- a/fonctions.php
+++ b/fonctions.php
@@ -188,6 +188,22 @@ function sendEmail( $to, $subject, $body, $headers, $param)
 
 }
 
+function makeHeaders() {
+
+  $headers_str = <<<EOF
+From: %s <%s>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+EOF;
+
+  $encoded_app = '=?UTF-8?B?' . base64_encode( NOMAPPLICATION, ) . '?=' ;
+  $headers = sprintf( $headers_str, $encoded_app, ADRESSEMAILADMIN ) ;
+
+  return $headers ;
+
+}
+
 
 /**
  * Fonction vérifiant l'existance et la valeur non vide d'une clé d'un tableau
diff --git a/studs.php b/studs.php
index f8446e00a66968d397ce33eb0a2bfc40ffbe6ce2..c74052b11b7a16f82c45255996bf4a1c147d4163 100644
--- a/studs.php
+++ b/studs.php
@@ -171,7 +171,7 @@ if (!is_error(NO_POLL) && (isset($_POST["boutonp"]) || isset($_POST["boutonp_x"]
       $connect->Execute($sql, array($nom, $numsondage, $nouveauchoix));
 
       if ($dsondage->mailsonde || /* compatibility for non boolean DB */ $dsondage->mailsonde=="yes" || $dsondage->mailsonde=="true") {
-        $headers="From: ".NOMAPPLICATION." <".ADRESSEMAILADMIN.">\r\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: 8bit";
+        $headers =  makeHeaders() ;
         sendEmail( "$dsondage->mail_admin",
               "[".NOMAPPLICATION."] "._("Poll's participation")." : ".html_entity_decode($dsondage->titre, ENT_QUOTES, 'UTF-8')."",
               html_entity_decode("\"$nom\" ", ENT_QUOTES, 'UTF-8').
@@ -307,7 +307,7 @@ if ($testmodifier) {
       $connect->Execute($sql, array($nouveauchoix, $data->nom, $data->id_users));
       
       if ($dsondage->mailsonde=="yes") {
-        $headers="From: ".NOMAPPLICATION." <".ADRESSEMAILADMIN.">\r\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: 8bit";
+        $headers =  makeHeaders() ;
         sendEmail( "$dsondage->mail_admin", "[".NOMAPPLICATION."] " . _("Poll's participation") . " : ".html_entity_decode($dsondage->titre, ENT_QUOTES, 'UTF-8'), "\"".html_entity_decode($data->nom, ENT_QUOTES, 'UTF-8')."\""."" . _("has filled a line.\nYou can find your poll at the link") . " :\n\n".getUrlSondage($numsondage)." \n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION,$headers );
       }
     }