From 91ac6bff8c3576f010d0b7b09a2d7704756218fb Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 24 May 2023 16:59:55 +0200 Subject: [inc/Mailer] Add comments --- inc/mailer.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'inc') 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']; -- cgit v1.2.3-55-g7522