diff --git a/Classes/Utility/MailUtility.php b/Classes/Utility/MailUtility.php index 93bc423..79293dd 100644 --- a/Classes/Utility/MailUtility.php +++ b/Classes/Utility/MailUtility.php @@ -79,10 +79,6 @@ class MailUtility $type = 'tableLayout'; $textPart = substr($textPart, 3); } - if (substr($textPart, 0, 3) === '---') { - $type = 'divider'; - $textPart = substr($textPart, 3); - } if (substr($textPart, 0, 9) === '%subject ') { $type = 'subject'; $textPart = substr($textPart, 9); @@ -238,7 +234,6 @@ class MailUtility case 'buttonleft': case 'buttoncenter': case 'buttonright': - case 'divider': case 'hr': $row['data'] = str_replace( "\\\n", @@ -315,10 +310,77 @@ class MailUtility $bodydataText[] = $textRow; $bodydataHtml[] = $htmlRow; break; - case 'contentBlockHtml': - $htmlRow = $row; - $bodydataHtml[] = $htmlRow; - break; + //case 'button': + // $row['data'] = str_replace( + // "\\\n", + // '', + // $row['data'] + // ); + // $htmlRow = $row; + // $htmlRow['data'] = preg_replace_callback( + // '/\[.*\]/mU', + // function($matches) { + // foreach ($matches as $match) { + // $test = preg_replace_callback( + // '/\[(\S*)\s(.*)\]/mU', + // function($matchesInner) { + // + // return '' + // . $matchesInner[2] + // . ''; + // }, + // $match + // ); + // \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump( + // $test, null, 3, true, false + // ); + // return $test; + // } + // }, + // $htmlRow['data'] + // ); + // \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump( + // $htmlRow['data'], null, 3, true, false + // ); + // $htmlRow['data'] = preg_replace_callback( + // '/\*.*\*/mU', + // function($matches) { + // foreach ($matches as $match) { + // return '' + // . substr($match, 1, -1) + // . ''; + // } + // }, + // $htmlRow['data'] + // ); + // $textRow = $row; + // $textRow['data'] = preg_replace_callback( + // '/\[.*\]/mU', + // function($matches) { + // foreach ($matches as $match) { + // return preg_replace_callback( + // '/\[(\S*)\s(.*)\]/mU', + // function($matchesInner) { + // if ( + // $matchesInner[2] == $matchesInner[1] + // ) { + // return $matchesInner[1]; + // } + // return $matchesInner[2] + // . ': ' + // . $matchesInner[1]; + // }, + // $match + // ); + // } + // }, + // $textRow['data'] + // ); + // $bodydataText[] = $textRow; + // $bodydataHtml[] = $htmlRow; + // break; case 'attachment': $mail->attach(new \Swift_Attachment( $row['data'][0], @@ -342,6 +404,9 @@ class MailUtility } $textView->assign('content', $bodydataText); $htmlView->assign('content', $bodydataHtml); + //\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump( + // $bodydataHtml, null, 8, true, false + //); $domain = $settings['mailDomain']; if ($assetDomain) { $domain = $assetDomain; diff --git a/Resources/Private/Partials/Mails/DefaultHtml.html b/Resources/Private/Partials/Mails/DefaultHtml.html index 23ae25e..21ae11a 100644 --- a/Resources/Private/Partials/Mails/DefaultHtml.html +++ b/Resources/Private/Partials/Mails/DefaultHtml.html @@ -15,7 +15,7 @@ - + @@ -24,16 +24,12 @@ - - {row.data -> f:format.raw()} - - - -

-

-
-

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

+

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