From 329de2771e40fe7550d4453375a6de7943a3857d Mon Sep 17 00:00:00 2001 From: Philipp Dieter Date: Fri, 9 Dec 2022 01:42:02 +0100 Subject: [PATCH 1/2] [TASK] Mail: Add hr, right aligned table, debugging output --- Classes/Utility/MailUtility.php | 21 ++++++++++++++++++ .../Private/Partials/Mails/DefaultHtml.html | 22 ++++++++++++++++--- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/Classes/Utility/MailUtility.php b/Classes/Utility/MailUtility.php index 48149b2..79293dd 100644 --- a/Classes/Utility/MailUtility.php +++ b/Classes/Utility/MailUtility.php @@ -223,6 +223,7 @@ class MailUtility switch($row['type']) { case 'text': case 'table': + case 'tablelr': case 'tableLayout': case 'list': case 'textbold': @@ -233,6 +234,7 @@ class MailUtility case 'buttonleft': case 'buttoncenter': case 'buttonright': + case 'hr': $row['data'] = str_replace( "\\\n", '', @@ -457,4 +459,23 @@ class MailUtility } } } + + /** + * Debug print + */ + public static function printMaildata($maildata) + { + foreach ($maildata as $row) { + if (!is_array($row['data'])) { + print($row['data']); + } else { + print($row['data'][0]); + print(PHP_EOL); + print($row['data'][1]); + } + print(PHP_EOL); + } + print(PHP_EOL); + } + } diff --git a/Resources/Private/Partials/Mails/DefaultHtml.html b/Resources/Private/Partials/Mails/DefaultHtml.html index a704f4d..94da85e 100644 --- a/Resources/Private/Partials/Mails/DefaultHtml.html +++ b/Resources/Private/Partials/Mails/DefaultHtml.html @@ -30,6 +30,7 @@ || {row.type} == 'buttonleft' || {row.type} == 'buttoncenter' || {row.type} == 'buttonright' + || {row.type} == 'hr' "> -
+ + + + + + + + +
- From 0f3e88ac961fbffa82f2bb3d34e5df495b8c22c4 Mon Sep 17 00:00:00 2001 From: Philipp Dieter Date: Fri, 4 Aug 2023 14:11:20 +0200 Subject: [PATCH 2/2] [BUGFIX] Fix hr layout in outlook --- .../Private/Partials/Mails/DefaultHtml.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Resources/Private/Partials/Mails/DefaultHtml.html b/Resources/Private/Partials/Mails/DefaultHtml.html index 94da85e..d3c4520 100644 --- a/Resources/Private/Partials/Mails/DefaultHtml.html +++ b/Resources/Private/Partials/Mails/DefaultHtml.html @@ -105,6 +105,25 @@

+

{row.data -> f:format.nl2br() -> f:format.raw()}

-
+
+
{row.data.1 -> f:format.nl2br() -> f:format.raw()}