diff --git a/Classes/Controller/MailController.php b/Classes/Controller/MailController.php index 2e21e11d8bdc3f9e06062beb9afcf6b3c60e0c5c..875b3f8f598b7859507a11d43406daaf939b316f 100644 --- a/Classes/Controller/MailController.php +++ b/Classes/Controller/MailController.php @@ -257,6 +257,13 @@ class MailController extends ActionController { * @throws \TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException */ public function sendTestMailAction(array $parameters = []) { + $arguments = []; + if ($parameters['selectedExtension']) { + $arguments['selectedExtension'] = $parameters['selectedExtension']; + } + if ($parameters['selectedTemplate']) { + $arguments['selectedTemplate'] = $parameters['selectedTemplate']; + } foreach ((array) $parameters['templates'] as $parameter) { $ccAddresses = GeneralUtility::trimExplode(',', $parameter['cc']); if (\count($ccAddresses) > 0) { @@ -266,7 +273,6 @@ class MailController extends ActionController { $message = LocalizationUtility::translate('backend.error_cc', 'sg_mail'); $this->addFlashMessage($message, '', FlashMessage::WARNING); - $arguments = $this->request->getArguments(); $this->redirect('index', NULL, NULL, $arguments); } } @@ -279,7 +285,6 @@ class MailController extends ActionController { $message = LocalizationUtility::translate('backend.error_bcc', 'sg_mail'); $this->addFlashMessage($message, '', FlashMessage::WARNING); - $arguments = $this->request->getArguments(); $this->redirect('index', NULL, NULL, $arguments); } } @@ -298,7 +303,6 @@ class MailController extends ActionController { if (!$this->request->hasArgument('saveOnly')) { if (!filter_var($parameters['emailAddress'], FILTER_VALIDATE_EMAIL)) { - $arguments = $this->request->getArguments(); $this->redirect('index', NULL, NULL, $arguments); } @@ -326,7 +330,6 @@ class MailController extends ActionController { $this->addFlashMessage($message, '', FlashMessage::ERROR); } } - $arguments = $this->request->getArguments(); $this->redirect('index', NULL, NULL, $arguments); }