tiki-mailin-code.php 814 Bytes
Newer Older
1
<?php
changi67's avatar
changi67 committed
2 3 4
/**
 * @package tikiwiki
 */
5
// (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project
changi67's avatar
changi67 committed
6
//
7 8
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
changi67's avatar
changi67 committed
9 10
// $Id$

11 12
use Tiki\MailIn;

changi67's avatar
changi67 committed
13 14
require_once ('tiki-setup.php');
$access->check_script($_SERVER["SCRIPT_NAME"], basename(__FILE__));
15
include_once ("lib/webmail/tikimaillib.php");
16

17
$mailinlib = TikiLib::lib('mailin');
18

19 20
// Get a list of ACTIVE emails accounts configured for mailin procedures
$accs = $mailinlib->list_active_mailin_accounts(0, -1, 'account_desc', '');
21

22
// foreach account
23
foreach ($accs['data'] as $acc) {
24 25 26
	if (empty($acc['account'])) {
		continue;
	}
changi67's avatar
changi67 committed
27

28
	$account = MailIn\Account::fromDb($acc);
29
	$account->check();
30
}