Skip to content
Snippets Groups Projects
Commit ca9e69c6 authored by Moritz Strohm's avatar Moritz Strohm
Browse files

fix for BIESt 3523, closes #3523

Closes #3523

Merge request studip/studip!2408
parent 41a96230
No related branches found
No related tags found
No related merge requests found
...@@ -123,15 +123,19 @@ class MailQueueEntry extends SimpleORMap ...@@ -123,15 +123,19 @@ class MailQueueEntry extends SimpleORMap
{ {
$mail = new StudipMail($this->mail); $mail = new StudipMail($this->mail);
$success = $mail->send(); if ($mail->getRecipients()) {
if ($success) { $success = $mail->send();
$this->delete(); if ($success) {
$this->delete();
} else {
$this['tries'] = $this['tries'] + 1;
$this['last_try'] = time();
$this->store();
}
} else { } else {
$this['tries'] = $this['tries'] + 1; $success = false;
$this['last_try'] = time(); $this->delete();
$this->store();
} }
return $success; return $success;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment