Skip to content
Snippets Groups Projects
Commit 15859bab authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Saving templates for specific site root id

parent adf58516
No related branches found
No related tags found
1 merge request!2Feature multiclient
......@@ -340,6 +340,7 @@ class MailController extends ActionController {
$template->setCc($selectedCc);
$template->setBcc($selectedBcc);
$template->setReplyTo($selectedReplyTo);
$template->setSiteRootId($siteRootId);
if ($templateAlreadyExists) {
$this->templateRepository->update($template);
......
......@@ -313,6 +313,7 @@ class MailTemplateService {
*
* @param boolean $isPreview
* @return boolean email was sent or added to mail queue successfully?
* @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
*/
public function sendEmail($isPreview = FALSE) {
/** @var Template $template */
......@@ -435,8 +436,9 @@ class MailTemplateService {
$mail->setSendingTime($sendingTime);
$mail->setReplyTo($this->replyToAddress);
$mail->setSiteRootId($this->replyToAddress);
$pageUid = (int) GeneralUtility::_GP('id');
$siteRootId = BackendService::getSiteRoot($pageUid)['uid'];
$mail->setSiteRootId($siteRootId);
$mailRepository = $this->objectManager->get(MailRepository::class);
$mailRepository->add($mail);
......
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