summaryrefslogtreecommitdiff
path: root/admin/tend_mail_queue.php
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2005-12-16 06:34:55 +0000
committerChristian Fowler <spider@viovio.com>2005-12-16 06:34:55 +0000
commit91544f9367c2ad73932af17e92cba8f8eaf58519 (patch)
tree11fdc037e039b4cbf86db7ac1e649e6d43f7d569 /admin/tend_mail_queue.php
parent5c976e0f6488cd1cdd13d06abe4c99bf5bc40f99 (diff)
downloadnewsletters-91544f9367c2ad73932af17e92cba8f8eaf58519.tar.gz
newsletters-91544f9367c2ad73932af17e92cba8f8eaf58519.tar.bz2
newsletters-91544f9367c2ad73932af17e92cba8f8eaf58519.zip
get mailing working - things actually send now. still lots of debug stuff strewn about
Diffstat (limited to 'admin/tend_mail_queue.php')
-rw-r--r--admin/tend_mail_queue.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/admin/tend_mail_queue.php b/admin/tend_mail_queue.php
new file mode 100644
index 0000000..7565ca7
--- /dev/null
+++ b/admin/tend_mail_queue.php
@@ -0,0 +1,37 @@
+<?php
+
+ global $gBitSystem, $_SERVER;
+
+ $_SERVER['SCRIPT_URL'] = '';
+ $_SERVER['HTTP_HOST'] = '';
+ $_SERVER['HTTP_HOST'] = '';
+ $_SERVER['HTTP_HOST'] = '';
+ $_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' );
+
+ // add some protection for arbitrary thumbail execution.
+ // if argc is present, we will trust it was exec'ed command line.
+ if( empty( $argc ) && !$gBitUser->isAdmin() ) {
+ $gBitSystem->fatalError( 'You cannot run the thumbnailer' );
+ }
+
+ if( $gBitSystem->isPackageActive( 'newsletters' ) ) {
+ require_once( NEWSLETTERS_PKG_PATH.'BitMailer.php' );
+ global $gBitMailer;
+ $gBitMailer = new BitMailer();
+
+ $gBitMailer->tendQueue();
+ }
+
+?> \ No newline at end of file