Commit 2c97bb06 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Mark mails as sent when sent through backend, fixed a bug when sending through backend

parent 6e8e59c3
......@@ -448,10 +448,25 @@ class MailTemplateService {
$this->mailMessage->setTo($mailToSend->getToAddress());
$this->mailMessage->setFrom($mailToSend->getFromAddress(), $mailToSend->getFromName());
$this->mailMessage->setSubject($mailToSend->getMailSubject());
$this->mailMessage->setBcc(GeneralUtility::trimExplode(',', $mailToSend->getBccAddresses()));
$this->mailMessage->setCc(GeneralUtility::trimExplode(',', $mailToSend->getCcAddresses()));
$this->mailMessage->setReplyTo($mailToSend->getReplyTo());
if ($mailToSend->getCcAddresses()) {
$this->mailMessage->setBcc(GeneralUtility::trimExplode(',', $mailToSend->getBccAddresses()));
}
if ($mailToSend->getBccAddresses()) {
$this->mailMessage->setCc(GeneralUtility::trimExplode(',', $mailToSend->getCcAddresses()));
}
if ($mailToSend->getReplyTo()) {
$this->mailMessage->setReplyTo($mailToSend->getReplyTo());
}
$this->mailMessage->send();
if (!$mailToSend->getSent()) {
$mailToSend->setSent(TRUE);
$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