summaryrefslogtreecommitdiff
path: root/admin/tend_mail_queue.php
blob: f7bcbd8ba7da63046f69bee5cba8e41a9e0a36c6 (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
<?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';

/**
 * 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();
	}

?>