function checkMboxes($params) { $mbox = $params["mbox"]; $mailClass = new Model_Mail(); $mailClass->uid = $this->registry["ui"]["id"]; if (!$mailClass->checkMail($mbox)) { echo "false"; } else { echo "true"; } }
function checkMail() { $mailClass = new Model_Mail(); $users = $this->registry["user"]->getUsersList(); foreach ($users as $user) { $mailboxes = $mailClass->getUserInMailboxes($user["id"]); foreach ($mailboxes as $mailbox) { $mbox = $mailbox["email"]; $mailClass->uid = $user["id"]; $mailClass->checkMail($mbox); } } }