[BUGFIX] Only send test email if sender address configured
It is possible to send a test email in the Environment section of the Install Tool / Admin Tools. Previously, if the sender email was not configured via $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'] a default no-reply email address was used. Also, the sender email was not checked with GeneralUtility::validEmail. We now display a message in the dialog if the defaultMailFromAddress is not configured or is configured with an invalid email address. In this case, the form with input field and button is also not displayed. Sending with an invalid sender address is no longer possible in Test Mail Setup. The problem with the previous behavior was: - Not setting the value or setting it incorrectly is incomplete configuration. We should make the user aware of this. The point of sending a test mail is to test the configuration as well. - Emails with a sender address which does not exist or is not registered for the mail account might get rejected by the email server but the user gets no error message, so is kept in the dark. - Notifications from the mail server cannot be sent back if a no-reply email is used. If someone configures it that way, that is their responsibility, but we should not fall back to it. Resolves: #100084 Releases: main, 12.4 Change-Id: Ie9ad6eda320791ac27d81f109c4d253da63ace20 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78978 Tested-by:Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
Showing
- Build/Sources/TypeScript/install/module/environment/mail-test.ts 12 additions, 1 deletion...ources/TypeScript/install/module/environment/mail-test.ts
- typo3/sysext/install/Classes/Controller/EnvironmentController.php 36 additions, 5 deletions...sext/install/Classes/Controller/EnvironmentController.php
- typo3/sysext/install/Resources/Private/Templates/Environment/MailTest.html 17 additions, 12 deletions...all/Resources/Private/Templates/Environment/MailTest.html
- typo3/sysext/install/Resources/Public/JavaScript/module/environment/mail-test.js 1 addition, 1 deletion...sources/Public/JavaScript/module/environment/mail-test.js
Please register or sign in to comment