diff options
| author | Moritz Strohm <strohm@data-quest.de> | 2024-03-22 15:35:09 +0000 |
|---|---|---|
| committer | Moritz Strohm <strohm@data-quest.de> | 2024-03-22 15:35:09 +0000 |
| commit | ca9e69c6518e4db0ea7a17a27b0f8c505e79f705 (patch) | |
| tree | b1d125d33d363b1f2df6091d4803142d563f0b1a /lib/models/MailQueueEntry.class.php | |
| parent | 41a96230d778295f6553963f4b1d21b386c1499d (diff) | |
fix for BIESt 3523, closes #3523
Closes #3523
Merge request studip/studip!2408
Diffstat (limited to 'lib/models/MailQueueEntry.class.php')
| -rw-r--r-- | lib/models/MailQueueEntry.class.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/models/MailQueueEntry.class.php b/lib/models/MailQueueEntry.class.php index 7fe63f6..bc956e7 100644 --- a/lib/models/MailQueueEntry.class.php +++ b/lib/models/MailQueueEntry.class.php @@ -123,15 +123,19 @@ class MailQueueEntry extends SimpleORMap { $mail = new StudipMail($this->mail); - $success = $mail->send(); - if ($success) { - $this->delete(); + if ($mail->getRecipients()) { + $success = $mail->send(); + if ($success) { + $this->delete(); + } else { + $this['tries'] = $this['tries'] + 1; + $this['last_try'] = time(); + $this->store(); + } } else { - $this['tries'] = $this['tries'] + 1; - $this['last_try'] = time(); - $this->store(); + $success = false; + $this->delete(); } - return $success; } } |
