X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnetgrp%2Fmail.inc.php;h=eadeb167a0eb80c4cc27e02333d67cd8ccb4fe4f;hb=03bda5524bd16c5c160a314d42baefe0b3254c62;hp=891146a6270fa0866b5036dfe73a366ec79988a2;hpb=b41fa03aca6a3fb760e7bad8949f20fef3382bb8;p=platal.git diff --git a/modules/xnetgrp/mail.inc.php b/modules/xnetgrp/mail.inc.php index 891146a..eadeb16 100644 --- a/modules/xnetgrp/mail.inc.php +++ b/modules/xnetgrp/mail.inc.php @@ -67,7 +67,7 @@ function _send_xnet_mail($user, $body, $wiki, $mailer, $replyto = null) $text = str_ireplace(array('', '', ''), array($dear, $lastname, $firstname), $body); - $mailer->addTo($user); + $mailer->setTo($user); if ($replyto) { $mailer->addHeader('Reply-To', $replyto); } @@ -100,11 +100,11 @@ function send_xnet_mails($from, $sujet, $body, $wiki, $tos, $replyto = null, $up } else { $email = $user; } - if ($sent[$email]) { - continue; + + if (!isset($sent[$email])) { + _send_xnet_mail($user, $body, $wiki, $mailer, $replyto); + $sent[$email] = true; } - _send_xnet_mail($user, $body, $wiki, $mailer, $replyto); - $sent[$email] = true; } }