Updates the XnetGrp mailer to properly override the To: field, instead
authorVincent Zanotti <vincent.zanotti@m4x.org>
Sun, 4 Jul 2010 19:24:06 +0000 (21:24 +0200)
committerVincent Zanotti <vincent.zanotti@m4x.org>
Sun, 4 Jul 2010 19:24:06 +0000 (21:24 +0200)
of appending addresses to it (as the PlMailer there is reused, this
caused some O(n^2) email duplication).

Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
modules/xnetgrp/mail.inc.php

index a8518fb..eadeb16 100644 (file)
@@ -67,7 +67,7 @@ function _send_xnet_mail($user, $body, $wiki, $mailer, $replyto = null)
 
     $text = str_ireplace(array('<cher>', '<nom>', '<prenom>'),
                          array($dear, $lastname, $firstname), $body);
-    $mailer->addTo($user);
+    $mailer->setTo($user);
     if ($replyto) {
         $mailer->addHeader('Reply-To', $replyto);
     }