Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
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