require 'sources/IRB_Mailer.php';
$DB->query("SELECT name, email FROM ibf_members WHERE mgroup IN(".$to.") AND allow_admin_mails = '1'");
$counter = 0; $error_report = "";
while ( $r = $DB->fetch_row() )
{
$file = "uploads/".$this->post['attach_id'];
$mail = new IRB_Mailer($this->post['post'], $language);
if($this->post['attach_id'])$mail -> attacheFile($file, $this->post['attach_file']);
$mail -> setHtml();
$mail -> createTo(trim($r['email']));
$mail -> createFrom($from);
$mail -> createSubject($std->txt_stripslashes($this->topic['title']));
$error = $mail -> sendMail();
if($error)$error_report .= "<li><b>".$r['name']."</b> (".$r['email']."): ".$error."</li>";
else $counter++;
}
Вроде работает.

_____________
Бесплатному сыру в дырки не заглядывают...