les mails de création de sondages sont maintenant envoyés avec un reply-to configuré sur l'adresse du créateur du sondage et un from qui n'est pas obligatoirement l'adresse de l'admin de l'application
This commit is contained in:
parent
0a93fe8e8a
commit
36fd1608af
@ -116,8 +116,8 @@ function ajouter_sondage()
|
|||||||
$message_admin = sprintf($message_admin, getUrlSondage($sondage_admin, true));
|
$message_admin = sprintf($message_admin, getUrlSondage($sondage_admin, true));
|
||||||
|
|
||||||
if (validateEmail($_SESSION['adresse'])) {
|
if (validateEmail($_SESSION['adresse'])) {
|
||||||
sendEmail( "$_SESSION[adresse]", "[".NOMAPPLICATION."][" . _("Author's message") . "] " . _("Poll") . " : ".stripslashes(htmlspecialchars_decode($_SESSION["titre"],ENT_QUOTES)), $message_admin );
|
sendEmail( "$_SESSION[adresse]", "[".NOMAPPLICATION."][" . _("Author's message") . "] " . _("Poll") . " : ".stripslashes(htmlspecialchars_decode($_SESSION["titre"],ENT_QUOTES)), $message_admin, $_SESSION['adresse'] );
|
||||||
sendEmail( "$_SESSION[adresse]", "[".NOMAPPLICATION."][" . _("For sending to the polled users") . "] " . _("Poll") . " : ".stripslashes(htmlspecialchars_decode($_SESSION["titre"],ENT_QUOTES)), $message );
|
sendEmail( "$_SESSION[adresse]", "[".NOMAPPLICATION."][" . _("For sending to the polled users") . "] " . _("Poll") . " : ".stripslashes(htmlspecialchars_decode($_SESSION["titre"],ENT_QUOTES)), $message, $_SESSION['adresse'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
$date=date('H:i:s d/m/Y:');
|
$date=date('H:i:s d/m/Y:');
|
||||||
|
@ -168,10 +168,20 @@ function sendEmail( $to, $subject, $body, $headers, $param)
|
|||||||
} else {
|
} else {
|
||||||
$folding = "" ;
|
$folding = "" ;
|
||||||
} ;
|
} ;
|
||||||
|
// si $headers ne contient qu'une adresse email, on la considère comme adresse de reply-to, sinon on met l'adresse de no-reply definie dans variables.php
|
||||||
|
if (validateEmail($headers)) {
|
||||||
|
$replyTo = $headers;
|
||||||
|
$headers = ""; // on reinitialise $headers
|
||||||
|
} else {
|
||||||
|
$replyTo = ADRESSEEMAILREPONSEAUTO;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$from = sprintf( "From: %s%s <%s>\n", $encoded_app, $folding, ADRESSEMAILADMIN ) ;
|
$from = sprintf( "From: %s%s <%s>\n", $encoded_app, $folding, ADRESSEMAILADMIN ) ;
|
||||||
|
|
||||||
if ( $headers ) $headers .= "\n" ;
|
if ( $headers ) $headers .= "\n" ;
|
||||||
$headers .= $from ;
|
$headers .= $from ;
|
||||||
|
$headers .= "Reply-To: $replyTo\n";
|
||||||
$headers .= "MIME-Version: 1.0\n" ;
|
$headers .= "MIME-Version: 1.0\n" ;
|
||||||
$headers .= "Content-Type: text/plain; charset=UTF-8\n" ;
|
$headers .= "Content-Type: text/plain; charset=UTF-8\n" ;
|
||||||
$headers .= "Content-Transfer-Encoding: 8bit" ;
|
$headers .= "Content-Transfer-Encoding: 8bit" ;
|
||||||
|
Loading…
Reference in New Issue
Block a user