protected function sendAll($IDs) { $sub = new Subscription(); foreach ($IDs as $ID) { if (!$ID) { continue; } echo "{$ID} sent to " . $sub->send_bulk($ID) . " email(s)\n"; } }
/** * Send digest and list mails for all subscriptions which are in effect for the * current page * * @author Adrian Lang <*****@*****.**> */ function sendDigest() { global $conf; global $ID; echo 'sendDigest(): started' . NL; if (!actionOK('subscribe')) { echo 'sendDigest(): disabled' . NL; return false; } $sub = new Subscription(); $sent = $sub->send_bulk($ID); echo "sendDigest(): sent {$sent} mails" . NL; echo 'sendDigest(): finished' . NL; return (bool) $sent; }