Author Topic: smtp report  (Read 495 times)

sanj

  • I know about email
  • ***
  • Posts: 53
  • Karma: +0/-0
    • View Profile
smtp report
« on: June 23, 2007, 02: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
  • I know email inside out
  • *****
  • Posts: 3713
  • Karma: +33/-0
    • View Profile
    • http://listmailpro.com
smtp report
« Reply #1 on: June 23, 2007, 05: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]
<?php
include&#40;'./config.php'&#41;;
include&#40;'./admin.php'&#41;;
$maxtime=600// max script run time X secs
$delay=10// update every X secs

$start=time&#40;&#41;;
while&#40;!$done&#41;&#123;
 
list&#40;$count&#41;=mysql_fetch_row&#40;mysql_query&#40;"select count&#40;*&#41; from lm_sendq"&#41;&#41;;
 
echo date&#40;"Y-m-d H&#58;i&#58;s T"&#41;." <b>$count</b> messages left<br>";
 
flush&#40;&#41;;
 
$diff time&#40;&#41;-$start;
 
if&#40;$diff>=$maxtime&#41; $done=1; else sleep&#40;$delay&#41;;
&#125;
echo "Maximum execution time reached.<br>";
?>

Regards
ListMailPRO Author & Developer - Help | Support | Hosting