public static function mailq()
    {
        global $PPHP;
        $db = $PPHP['db'];

        $q = $db->query("SELECT id FROM emails");
        $q->where('NOT isSent');
        $q->and('sender = ?', 0);
        $q->and("modified < datetime('now', '-1 hour')");
        $queue = $db->selectList($q);
        foreach ($queue as $emailId) {
            self::sendOutboxEmail($emailId, false);
        };
    }