Fix: add Return-Path for simplemail class for used the "error" mail or "form" mail to avoid feedback at www-data
This commit is contained in:
parent
d69fc467b4
commit
36a09aef35
@ -339,8 +339,17 @@ class simplemail {
|
|||||||
}
|
}
|
||||||
foreach ($this->recipientlist as $key => $to)
|
foreach ($this->recipientlist as $key => $to)
|
||||||
{
|
{
|
||||||
|
$bounce = '';
|
||||||
|
if ($conf->global->MAIN_MAIL_ALLOW_SENDMAIL_F)
|
||||||
|
{
|
||||||
|
// DOLCHANGE LDR
|
||||||
|
// le return-path dans les header ne fonctionne pas avec tous les MTA
|
||||||
|
// Le passage par -f est donc possible si la constante MAIN_MAIL_ALLOW_SENDMAIL_F est definie.
|
||||||
|
// La variable definie pose des pb avec certains sendmail securisee (option -f refusee car dangereuse)
|
||||||
|
$bounce = $this->returnpath != '' ? "-f {$this->returnpath}" : "";
|
||||||
|
}
|
||||||
// $this->recipient = $to['mail']; DOLCHANGE LDR Fix the To in header was not filled
|
// $this->recipient = $to['mail']; DOLCHANGE LDR Fix the To in header was not filled
|
||||||
if ( mail($to['mail'], $this->subject, $this->body, $this->makeheader() ) ) {
|
if ( mail($to['mail'], $this->subject, $this->body, $this->makeheader() , $bounce ) ) {
|
||||||
$this->error_log("envoie vers {$to['nameplusmail']} reussi");
|
$this->error_log("envoie vers {$to['nameplusmail']} reussi");
|
||||||
} else {
|
} else {
|
||||||
$this->error_log("envoie vers {$to['nameplusmail']} echoue");
|
$this->error_log("envoie vers {$to['nameplusmail']} echoue");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user