summaryrefslogtreecommitdiff
path: root/admin/tend_mail_queue.php
blob: 14f815bf6a9563a2323b1be9b43abe6656938b3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php

	global $gBitSystem, $_SERVER;

	$_SERVER['SCRIPT_URL'] = '';
	$_SERVER['HTTP_HOST'] = '';
	$_SERVER['HTTP_USER_AGENT'] = '';
	$_SERVER['SERVER_NAME'] = '';
	$_SERVER['SERVER_ADMIN'] = '';
	$_SERVER['SERVER_SOFTWARE'] = 'command line';
	$_REQUEST['uri_mode'] = TRUE;

/**
 * required setup
 */
	if( !empty( $argc ) ) {
		// reduce feedback for command line to keep log noise way down
		define( 'BIT_PHP_ERROR_REPORTING', E_ERROR | E_PARSE );
	}

	require_once( '../../bit_setup_inc.php' );

	if( $gBitSystem->isPackageActive( 'newsletters' ) ) {
		require_once( NEWSLETTERS_PKG_PATH.'BitMailer.php' );
		global $gBitMailer;
		$gBitMailer = new BitMailer();

		$gBitMailer->tendQueue();
	}

?>