Author Topic: smtp report  (Read 11537 times)

sanj

  • Posts: 54
    • View Profile
smtp report
« 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
Magnetic Therapy Natural Pain Relief for Arthritis, Back Pain and More... at http://www.worldofmagnets.co.uk

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
smtp report
« Reply #1 on: June 23, 2007, 06:31:00 pm »
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):

Code: [Select]
<?phpinclude('./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
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting