diff --git a/Classes/Configuration.php b/Classes/Configuration.php index e62c795..ba339c9 100644 --- a/Classes/Configuration.php +++ b/Classes/Configuration.php @@ -23,7 +23,7 @@ public function __construct() try { $settings = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('sent_mails'); - $this->rejectBySearchTerms = GeneralUtility::trimExplode('|', $settings['rejectBySearchTerms'] ?? '', true); + $this->rejectBySearchTerms = GeneralUtility::trimExplode('###', $settings['rejectBySearchTerms'] ?? '', true); $this->mailAPIUsername = $settings['mailAPIUsername'] ?? ''; $this->mailAPIPassword = $settings['mailAPIPassword'] ?? ''; } catch (\Exception $e) { diff --git a/Readme.md b/Readme.md index 6ab782f..26baf42 100644 --- a/Readme.md +++ b/Readme.md @@ -7,6 +7,9 @@ Using a dedicated backend module a user can: * resend the mail * forward the mail to a different email address * reject mails with a specific content +* send a test email + +![module.png](Resources/Public/Screenshots/module.png) ## Installation @@ -16,7 +19,18 @@ This extension requires the usage of composer! composer req studiomitte/sent-mails ``` -## Mail-Information API +## Features + +### Reject sending mails + +The extension provides a simple way to reject sending mails with a specific content. This can be useful to prevent sending mails to special email addresses. +The current use case is to skip sending mails triggered by frontend tests which use a specific email address like `cypress+1709191116@domain.tld`. + +The regex searchwords can be configured in the extension settings with e.g. `cypress\+[\._a-zA-Z0-9-]+@domain\.tld'`. + +### Mail-Information API Calling `/api/mailinformation?search=somecontent` will return a status information about the sent mails. Basic auth needs to be configured in the extension settings. +It only allows to retrieve the information of mails sent in the last 60 seconds +In combination with the feature "Reject sending mails" this can be used to check if a mail would have been sent or not. diff --git a/Resources/Public/Screenshots/module.png b/Resources/Public/Screenshots/module.png new file mode 100644 index 0000000..6b51936 Binary files /dev/null and b/Resources/Public/Screenshots/module.png differ diff --git a/composer.json b/composer.json index 00490ef..013941b 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "TYPO3", "extension", "backend", - "search" + "mail" ], "authors": [ {