diff options
author | Simon Rettberg | 2023-05-24 16:59:55 +0200 |
---|---|---|
committer | Simon Rettberg | 2023-05-24 16:59:55 +0200 |
commit | 91ac6bff8c3576f010d0b7b09a2d7704756218fb (patch) | |
tree | fc8a724a7c2a534d8086b87fa00b63c8144bbd90 /inc | |
parent | [statistics] hints: Only show machines active in recent past (60 days) (diff) | |
download | slx-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.php | 4 |
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']; |