X-Git-Url: https://git.p6c8.net/form-email.git/blobdiff_plain/563d413be761234847d58f41e06bbb74fee7cb3b..5607d82fb5d5e1680e5d9d72876875f831450b62:/form-email/mailer.php diff --git a/form-email/mailer.php b/form-email/mailer.php index b3955bb..76fc648 100644 --- a/form-email/mailer.php +++ b/form-email/mailer.php @@ -353,43 +353,48 @@ for($x=0;$x 0) { $dp = opendir($store_mails_dir); - + while($stored_mail_file = readdir($dp)) { if($stored_mail_file != '.' && $stored_mail_file != '..' && substr($stored_mail_file,0,strlen($store_mails_prefix)) == $store_mails_prefix) { $stored_mail_files[$store_mails_dir.'/'.$stored_mail_file] = filemtime($store_mails_dir.'/'.$stored_mail_file); } } - + closedir($dp); - + arsort($stored_mail_files); - - #print sizeof($stored_mail_files); - - #print_r($stored_mail_files); - + $x = 0; - + foreach(array_keys($stored_mail_files) as $stored_mail_filename) { $x++; - + if($x > $store_mails_max) { unlink($stored_mail_filename); }