diff --git a/Classes/Controller/FormController.php b/Classes/Controller/FormController.php index 279e3cfa2..c8f7d6906 100644 --- a/Classes/Controller/FormController.php +++ b/Classes/Controller/FormController.php @@ -202,7 +202,7 @@ public function createAction(Mail $mail, string $hash = ''): void $this->settings, $this->conf ); - $mailPreflight->sendOptinConfirmationMail($mail); + $mailPreflight->sendOptinConfirmationMail($mail, $this->contentObject->data); $this->view->assign('optinActive', true); } if ($this->isPersistActive()) { @@ -238,7 +238,7 @@ protected function sendMailPreflight(Mail $mail, string $hash = ''): void $this->settings, $this->conf ); - $mailPreflight->sendSenderMail($mail); + $mailPreflight->sendSenderMail($mail, $this->contentObject->data); } if ($this->isReceiverMailEnabled()) { $mailPreflight = $this->objectManager->get(SendReceiverMailPreflight::class, $this->settings); diff --git a/Classes/Domain/Service/Mail/SendOptinConfirmationMailPreflight.php b/Classes/Domain/Service/Mail/SendOptinConfirmationMailPreflight.php index ea7d76f45..a629961f0 100644 --- a/Classes/Domain/Service/Mail/SendOptinConfirmationMailPreflight.php +++ b/Classes/Domain/Service/Mail/SendOptinConfirmationMailPreflight.php @@ -55,6 +55,7 @@ public function __construct(array $settings, array $conf) /** * @param Mail $mail + * @param array $ttContentData * @return void * @throws InvalidConfigurationTypeException * @throws InvalidControllerNameException @@ -63,7 +64,7 @@ public function __construct(array $settings, array $conf) * @throws InvalidSlotReturnException * @throws Exception */ - public function sendOptinConfirmationMail(Mail $mail): void + public function sendOptinConfirmationMail(Mail $mail, $ttContentData): void { $email = [ 'template' => 'Mail/OptinMail', @@ -86,7 +87,8 @@ public function sendOptinConfirmationMail(Mail $mail): void 'hash' => HashUtility::getHash($mail), 'hashDisclaimer' => HashUtility::getHash($mail, 'disclaimer'), 'mail' => $mail, - 'L' => FrontendUtility::getSysLanguageUid() + 'L' => FrontendUtility::getSysLanguageUid(), + 'ttContentData' => $ttContentData ] ]; $this->sendMailService->sendMail($email, $mail, $this->settings, 'optin'); diff --git a/Classes/Domain/Service/Mail/SendSenderMailPreflight.php b/Classes/Domain/Service/Mail/SendSenderMailPreflight.php index 0d091994a..27330f103 100644 --- a/Classes/Domain/Service/Mail/SendSenderMailPreflight.php +++ b/Classes/Domain/Service/Mail/SendSenderMailPreflight.php @@ -55,6 +55,7 @@ public function __construct(array $settings, array $conf) /** * @param Mail $mail + * @param array $ttContentData * @return void * @throws InvalidConfigurationTypeException * @throws InvalidControllerNameException @@ -63,7 +64,7 @@ public function __construct(array $settings, array $conf) * @throws InvalidSlotReturnException * @throws Exception */ - public function sendSenderMail(Mail $mail): void + public function sendSenderMail(Mail $mail, $ttContentData): void { $senderService = ObjectUtility::getObjectManager()->get(SenderMailPropertiesService::class, $this->settings); $email = [ @@ -82,7 +83,8 @@ public function sendSenderMail(Mail $mail): void 'format' => $this->settings['sender']['mailformat'], 'variables' => [ 'hashDisclaimer' => HashUtility::getHash($mail, 'disclaimer'), - 'L' => FrontendUtility::getSysLanguageUid() + 'L' => FrontendUtility::getSysLanguageUid(), + 'ttContentData' => $ttContentData ] ]; $this->sendMailService->sendMail($email, $mail, $this->settings, 'sender'); diff --git a/Classes/Utility/TypoScriptUtility.php b/Classes/Utility/TypoScriptUtility.php index 3e393104a..46439d381 100644 --- a/Classes/Utility/TypoScriptUtility.php +++ b/Classes/Utility/TypoScriptUtility.php @@ -16,7 +16,7 @@ class TypoScriptUtility * Overwrite a string if a TypoScript cObject is available * * @param string $string Value to overwrite - * @param array $conf TypoScript Configuration Array + * @param array|null $conf TypoScript Configuration Array * @param string $key Key for TypoScript Configuration * @return string * @codeCoverageIgnore @@ -24,7 +24,7 @@ class TypoScriptUtility */ public static function overwriteValueFromTypoScript( string $string = '', - array $conf = [], + ?array $conf = [], string $key = '' ): string { if (ObjectUtility::getContentObject()->cObjGetSingle($conf[$key], $conf[$key . '.'])) { diff --git a/Resources/Private/Partials/Mail/DisclaimerLink.html b/Resources/Private/Partials/Mail/DisclaimerLink.html index 580e3640e..b03b10adc 100644 --- a/Resources/Private/Partials/Mail/DisclaimerLink.html +++ b/Resources/Private/Partials/Mail/DisclaimerLink.html @@ -1,6 +1,6 @@

Do you want to delete your request?
- delete + delete

diff --git a/Resources/Private/Templates/Mail/OptinMail.html b/Resources/Private/Templates/Mail/OptinMail.html index 890099244..b4992e50c 100644 --- a/Resources/Private/Templates/Mail/OptinMail.html +++ b/Resources/Private/Templates/Mail/OptinMail.html @@ -9,6 +9,7 @@ {mail} Complete Mail Object {hash} Hash for optin URI {settings} TypoScript Settings + {ttContentData} All values from content element with plugin @@ -16,7 +17,7 @@ - + diff --git a/Resources/Private/Templates/Mail/SenderMail.html b/Resources/Private/Templates/Mail/SenderMail.html index eee5dfdbf..d0de29ff3 100644 --- a/Resources/Private/Templates/Mail/SenderMail.html +++ b/Resources/Private/Templates/Mail/SenderMail.html @@ -9,6 +9,7 @@ {mail} Complete Mail Object {email} Email Configuration {settings} TypoScript Settings +{ttContentData} All values from content element with plugin NOTE: See example section after main section