function mailhandler_cron in Mailhandler 7
Same name and namespace in other branches
- 5 mailhandler.module \mailhandler_cron()
- 6 mailhandler.module \mailhandler_cron()
Implementation of hook_cron(). Process msgs from all enabled mailboxes.
File
- ./
mailhandler.module, line 7
Code
function mailhandler_cron() {
// Include mailhandler retrieval functions
module_load_include('inc', 'mailhandler', 'mailhandler.retrieve');
// Retrieve messages
$result = db_query('SELECT * FROM {mailhandler} WHERE enabled = 1 ORDER BY mail');
while ($mailbox = db_fetch_array($result)) {
mailhandler_node_process_mailbox($mailbox, 'auto', variable_get('mailhandler_max_retrieval', 0), array());
}
}