X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnetgrp%2Fmail.inc.php;h=a998e99ae6324688e46a246c1ac6c5ce10f863d1;hb=efe597c5795234724bc3df508bd628f9860a9c32;hp=b6574c50d50493657c7b9cc0c228aae05e0497a7;hpb=13627befde705c99059edd34d0f913476736f6a5;p=platal.git diff --git a/modules/xnetgrp/mail.inc.php b/modules/xnetgrp/mail.inc.php index b6574c5..a998e99 100644 --- a/modules/xnetgrp/mail.inc.php +++ b/modules/xnetgrp/mail.inc.php @@ -1,6 +1,6 @@ " : $user['email']; - + $text = $body; $text = preg_replace('!!i', $cher, $text); $text = preg_replace('!!i', $nom, $text); @@ -92,14 +92,18 @@ function _send_xnet_mail($user, $body, $mailer, $replyto = null) if ($replyto) { $mailer->addHeader('Reply-To', $replyto); } - $mailer->setTxtBody(wordwrap($text, 72)); + if ($wiki) { + $mailer->setWikiBody($text); + } else { + $mailer->setTxtBody(wordwrap($text, 72)); + } $mailer->send(); } // }}} // {{{ send_xnet_mails -function send_xnet_mails($from, $sujet, $body, $tos, $replyto = null, $upload = null, $name = null) +function send_xnet_mails($from, $sujet, $body, $wiki, $tos, $replyto = null, $upload = null, $name = null) { global $globals; $sent = array(); @@ -113,7 +117,7 @@ function send_xnet_mails($from, $sujet, $body, $tos, $replyto = null, $upload = foreach ($tos as $user) { if ($sent[$user['email']]) continue; - _send_xnet_mail($user, $body, $mailer, $replyto); + _send_xnet_mail($user, $body, $wiki, $mailer, $replyto); $sent[$user['email']] = true; } }