summaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorSimon Rettberg2023-05-24 16:59:55 +0200
committerSimon Rettberg2023-05-24 16:59:55 +0200
commit91ac6bff8c3576f010d0b7b09a2d7704756218fb (patch)
treefc8a724a7c2a534d8086b87fa00b63c8144bbd90 /inc
parent[statistics] hints: Only show machines active in recent past (60 days) (diff)
downloadslx-admin-91ac6bff8c3576f010d0b7b09a2d7704756218fb.tar.gz
slx-admin-91ac6bff8c3576f010d0b7b09a2d7704756218fb.tar.xz
slx-admin-91ac6bff8c3576f010d0b7b09a2d7704756218fb.zip
[inc/Mailer] Add comments
Diffstat (limited to 'inc')
-rw-r--r--inc/mailer.inc.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/mailer.inc.php b/inc/mailer.inc.php
index 728e91b5..1545e930 100644
--- a/inc/mailer.inc.php
+++ b/inc/mailer.inc.php
@@ -109,14 +109,16 @@ class Mailer
WHERE nexttry <= UNIX_TIMESTAMP() LIMIT 20");
$cutoff = time() - 43200; // 12h
$mailers = [];
+ // Loop over mails, grouped by configid-rcpt-subject
foreach ($list as $mails) {
$delete = [];
$body = [];
+ // Loop over individual mails in current group
foreach ($mails as $mail) {
$delete[] = $mail['mailid'];
if ($mail['dateline'] < $cutoff) {
EventLog::info("Dropping queued mail '{$mail['subject']}' for {$mail['rcpt']} as it's too old.");
- continue; // Ignore
+ continue; // Ignore, too old
}
$body[] = ' *** ' . date('d.m.Y H:i:s', $mail['dateline']) . "\r\n"
. $mail['body'];