Commit 594afd8f authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[BUGFIX] Set the sending time via the MailQueue

If a mail is sent via the mail queue, we must also set the sending_time
to prevent the scheduler command controller from sending the same mail
that has been send via the mail queue again.
parent 392ce809
......@@ -461,6 +461,9 @@ class MailTemplateService {
}
$dateTime = new DateTime();
if ((int)$mailToSend->getSendingTime() === 0) {
$mailToSend->setSendingTime($dateTime->getTimestamp());
}
$mailToSend->setLastSendingTime($dateTime->getTimestamp());
$this->mailMessage->send();
$mailRepository->update($mailToSend);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment