diff --git a/Classes/Controller/QueueController.php b/Classes/Controller/QueueController.php
index 9b1178d491cdbfd3c10091c3706ead290e13a56e..893b354f0e2ae0c3521b7e7922dae69a219a3fb9 100644
--- a/Classes/Controller/QueueController.php
+++ b/Classes/Controller/QueueController.php
@@ -182,6 +182,18 @@ class QueueController extends ActionController {
$this->redirect('index', NULL, NULL, $this->request->getArguments());
}
+ /**
+ * Preview for a mail
+ *
+ * @param int $uid
+ */
+ public function previewAction($uid): void {
+ $mailService = new MailTemplateService();
+ $mailToPreview = $mailService->getMailObjectByUid($uid);
+
+ $this->view->assign('mail', $mailToPreview);
+ }
+
/**
* Download the queue data as a csv file, respecting the filter settings
*
@@ -225,7 +237,8 @@ class QueueController extends ActionController {
// save the Template filter to the session
if (!isset($_SESSION[$this->session->getSessionKey()]['filterTemplate'])
- || (isset($_POST['filterTemplate']) && $this->session->getDataByKey('filterTemplate') !== $_POST['filterTemplate'])) {
+ || (isset($_POST['filterTemplate'])
+ && $this->session->getDataByKey('filterTemplate') !== $_POST['filterTemplate'])) {
$this->session->setDataByKey('filterTemplate', $_POST['filterTemplate']);
}
diff --git a/Classes/Service/MailTemplateService.php b/Classes/Service/MailTemplateService.php
index 83676e37fb1f933936cd83e47a76eab3811be098..4ff49106aacc60da944710ac379421ab256902eb 100644
--- a/Classes/Service/MailTemplateService.php
+++ b/Classes/Service/MailTemplateService.php
@@ -1263,7 +1263,7 @@ class MailTemplateService {
* @param int $uid
* @return bool|object
*/
- private function getMailObjectByUid($uid) {
+ public function getMailObjectByUid($uid) {
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '10.4.0', '<')) {
/** @var MailRepository $mailRepository */
$mailRepository = $this->objectManager->get(MailRepository::class);
diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf
index 98b68fbbe1efc6aba403768f1ce3c0012ce549a2..0bdcf046cf34bee82dc787995eddab63063673e4 100644
--- a/Resources/Private/Language/de.locallang.xlf
+++ b/Resources/Private/Language/de.locallang.xlf
@@ -589,6 +589,30 @@ Die Templates declined und approved der Extension sg_comments sind für alle Dom
diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf
index 779454c18c6016855a4c2b68cb4d4a50d4643c33..5634e05a510907168fb333a0d85c9265cf0fbec4 100644
--- a/Resources/Private/Language/locallang.xlf
+++ b/Resources/Private/Language/locallang.xlf
@@ -441,6 +441,24 @@ The templates declined and approved of the sg_comments extension are blacklisted
+ + +
diff --git a/Resources/Private/Templates/Queue/Index.html b/Resources/Private/Templates/Queue/Index.html
index 78f27d7829e45e8b2b79068dac468b204e21924c..c75f7eeb34a2560755db9897f0b76cb27419845f 100644
--- a/Resources/Private/Templates/Queue/Index.html
+++ b/Resources/Private/Templates/Queue/Index.html
@@ -1,91 +1,113 @@
{namespace sgm=SGalinski\SgMail\ViewHelpers}
-
-
@@ -93,27 +115,27 @@
-
+
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- {mail.from_address}
-
-
- {mail.to_address}
-
- {mail.extension_key}: {mail.template_name}
-
-
+
+
+
+ {mail.from_address}
+
+
+ {mail.to_address}
+
+ {mail.extension_key}: {mail.template_name}
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+