ListMailPRO Email Marketing Software Forums
ListMailPRO Email Marketing Software Forums => Server Optimization, Tweaks => Topic started by: sanj on June 23, 2007, 03:19:47 am
-
hi,
is there any way a counter can be added to the smtp report that shows the time and the number of emails left and it would be great if it auto updates let's say every 5 minutes.
or is there a quick little script i can use
thanks
sanj
-
SanJ,
This would take a custom script. I have plans to ajaxify the 'queue status' header so it can auto update every several seconds without interfering with your browsing/using ListMail.
You can get the queue count with a MySQL query like this, (place script in LMP folder and browse to it):
<?php
include('./config.php');
include('./admin.php');
$maxtime=600; // max script run time X secs
$delay=10; // update every X secs
$start=time();
while(!$done){
list($count)=mysql_fetch_row(mysql_query("select count(*) from lm_sendq"));
echo date("Y-m-d H:i:s T")." <b>$count</b> messages left<br>";
flush();
$diff = time()-$start;
if($diff>=$maxtime) $done=1; else sleep($delay);
}
echo "Maximum execution time reached.<br>";
?>
Regards