Review main Abandoned

85337[BUGFIX] Revert to basic message for environment mail test

Georg Ringer CR 0 V -1 Easy +5 −9 updated 11/10/26, 14:00

Commit message

The only purpose of the mail test in the environment module is the
verification of the mail transfer itself. This must be as basic as
possible to avoid interference from other settings or features.

In particular advanced mailing features like Fluid-based mails should
not be used here since they are not meant to be created in the Install
Tool context. This becomes apparent as soon as one adds a custom system
email layout with e.g. f:translate viewhelper usage.

Review

  • Code review CR 0
  • Verified V -1
    • core-ci -1 CI

Issues 1

Files 1

Review log 4555

Show 2230 earlier messages
  1. Georg Ringer uploaded patch set 1 07/23/24, 14:48

  2. Georg Ringer commented on patch set 1 07/23/24, 14:48

    This change is ready for review.
  3. core-ci voted on patch set 1 V -1 07/23/24, 14:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62019

  4. Georg Ringer rebased onto patch set 2 V -1 07/23/24, 17:46

  5. core-ci voted on patch set 2 V -1 07/23/24, 17:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62036

  6. Georg Ringer rebased onto patch set 3 V -1 07/26/24, 06:38

  7. Georg Ringer uploaded patch set 4 07/26/24, 06:44

  8. core-ci voted on patch set 3 V -1 07/26/24, 06:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62248

  9. core-ci voted on patch set 4 V +1 07/26/24, 06:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62251

  10. Benni Mack voted on patch set 4 CR +1 V +1 07/26/24, 14:14

  11. Mathias Brodala commented on patch set 5 CR +1 V +1 08/23/24, 15:23

    Published edit on patch set 4.
  12. Mathias Brodala voted on patch set 5 CR +1 V +1 08/23/24, 15:23

  13. Mathias Brodala commented on patch set 5 08/23/24, 15:27

    Try/catch reduced to the bare minimum to not unintentionally catch exceptions elsewhere.
  14. core-ci voted on patch set 5 V -1 08/23/24, 15:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64086

  15. core-ci commented on patch set 5 08/23/24, 15:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64086

  16. Stefan Bürk commented on patch set 5 08/23/24, 19:29

    IMO the correct and only way to deal when recieving that LogicException is to provide a request with either FE or BE application type (and not not CLI/INSTALL). That means that the request used within the FluidMail rendering in the install tool context **must** pass a modified request to the FluidMail instance with at least a BE context (better that than the FE context). Extension authors using these thing in context enviromnent without proper request setup (or in tests) **must** recieve that excetion to fix their setup and not to silently fallback to a backend context (which would be a assumption from the core then). That should be precisly set by the extension author.
  17. Mathias Brodala rebased onto patch set 6 CR +1 V +1 08/23/24, 20:00

  18. core-ci voted on patch set 6 V +1 08/23/24, 20:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64103

  19. Mathias Brodala uploaded patch set 7 V +1 08/23/24, 20:13

  20. Mathias Brodala commented on patch set 7 CR +1 V +1 08/23/24, 20:13

    Reply

    Good one, adjusted now.
  21. core-ci voted on patch set 7 V +1 08/23/24, 20:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64104

  22. Christian Kuhn commented on patch set 7 CR -1 08/24/24, 22:41

    this change is an obvious hack. that's the tecchnical review. and here is my opinion: i do not understand the bottom of this: 'test mail setup' is a test mail by admins for admins. as being part of low level admin functionality, it is not supposed of being translatable, just like everything else in the install tool. apart from that, we should also *not* use the *currently logged in be-user* to do such stuff.
  23. Stefan Bürk commented on patch set 7 08/25/24, 15:08

    Reply

    Than we need a specific unchangable layout/mail for that specific mail and not using the configurable/changeable "system layout" used per default for all fluid mails. Which raises the need for a "test" mail method based on the configurable system layout for instances / integrators (not testing the pure mail settings).
  24. Mathias Brodala commented on patch set 7 CR 0 08/26/24, 06:13

    Reply

    Ack to all of this. And actually the purpose of this action is to test that mails can be sent at all. That these mails "look nice" is only a nice to have side-effect. So we should consider switching back to a very basic mail instead of using FluidEmail here. The latter obviously has too many unrelated features which are not necessary for testing mail transfer and can break it as seen here. Would everyone be fine with this?
  25. Garvin Hicking commented on patch set 7 08/26/24, 06:21

    Reply

    IMO it is very helpful to see mails with a customized layout getting sent for integrators - triggering mails differently could be a chore. Using a basic theme for mail test would be fine for me if we have the proposed "basic mail test" and a "customized mail test", which then kind of re-introduces this hack to be able to send that....?
  26. Mathias Brodala commented on patch set 7 08/26/24, 06:28

    Reply

    Indeed. A full blown-test of system emails (that's what this would be about) would then need to be located somewhere else outside of the Install Tool. So for now I'd vote for keeping it simple and stick to what is advertised. Nothing currently says that the test mails are supposed to look like system mails.
  27. Mathias Brodala commented on patch set 7 08/26/24, 07:12

    Reply

    Another positive side effect of this would be the option to explicitly test translations. Right now the currently suggested change would allow for this if one switches the language of the BE user account. A more explicit approach would make clear that translations are OK in system emails.
  28. Christian Kuhn commented on patch set 7 CR -2 08/27/24, 09:26

    I'll raise this to -2 now: The install tool mail is supposed to only test the mail transport chain. The casual case is that an admin sends a test mail to itself, rarely to a customer. It is a text mail by default, and english is the way to go here. Integrators should not turn this into a fancy styled html mail since this is a misuse of what this test feature is about. We should probably turn this back into a plain 'mail' send class and get rid of the current possibility to override the mail at all. If you want some custom text in this mail, then please add an input field to the interface that could (maybe) *change* the subject, and *maybe* add some *additional* text to the mail boilerplate. This feature is not supposed to be used to send *some* mail to *some* customer. It is a low level admin test feature.
  29. Stefan Bürk commented on patch set 7 08/27/24, 11:17

    Reply

    ack on that.
  30. Mathias Brodala uploaded patch set 8 V +1 08/27/24, 11:37

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  1. Mathias Brodala commented on patch set 8 08/27/24, 11:39

    Reply

    Same here. I've now basically reverted https://review.typo3.org/c/Packages/TYPO3.CMS/+/62362 here but kept the new text. We can consider adding some instance-specific info to the HTML/text part which would allow admins to identify the TYPO3 instance which sent the mail. But for now I'd not add any further features here.
  2. core-ci voted on patch set 8 V +1 08/27/24, 11:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64298

  3. Garvin Hicking commented on patch set 8 CR -1 08/27/24, 11:45

    Reply

    IMO this is a breaking change as backport for v12. Testing the SystemMail templates on the testmail is IMO important functionality. Please let's not remove that just because a new possible feature leads to too much adjustment. We should only remove that when another test functionality is in place that allows to easily verify sending SystemMail templates.
  4. Mathias Brodala commented on patch set 8 08/27/24, 12:29

    Reply

    Please note that this was only a drive-by change in https://review.typo3.org/c/Packages/TYPO3.CMS/+/62362 and should not have been done in the first place. Also this was never advertised as new feature so it's less likely people rely on this. I agree that testing Fluid/system mails is desirable though so maybe this change here should only considered for merge once such a feature was implemented. Since this fix can be applied as patch and covers mostly an edge case I also do not see a need to rush.
  5. Benni Mack updated the commit message in patch set 9 CR -1 V +1 10/18/24, 13:47

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  6. Benni Mack commented on patch set 9 04/12/25, 10:37

    Reply

    Reviving the discussion here. I personally think it is valid to test the HTML output within the functionality AND the pure email sending context. For this reason, I suggest to just add a Checkbox below the input field, "Send HTML email" and thus, making both functionality available. OK for everyone?
  7. Garvin Hicking commented on patch set 9 04/12/25, 12:02

    Reply Unresolved

    I would love that, and would IMO solve both needs.
  8. Christian Kuhn voted on patch set 9 CR -1 04/24/25, 12:26

  9. Christian Kuhn commented on patch set 9 04/24/25, 12:36

    Reply

    the problem with f:translate is the improper scoping within install tool regarding FE/BE - f:translate() is the heart of the issue in the first place. it showed that sending fluidemail within install tool is a problem. using the install tool to test the full email override system including translations and template overlay functionality is still a misuse and does not work well. that's why i oppose this idea and why i think its better to stick to MailMessage here, as proposed with the current state of the patch already. we could very well send an html mail as well as benni proposed, but i think the system should not be based on FluidEmail - at least until the main issues of FluidEmail are fixed: i did some pre-patches in this area already, but got shot down with further work, and one reason was the dependency from current install tool to FluidEmail, which should die, in my opinion.
  10. Benni Mack marked it work in progress 04/24/25, 12:39

  11. Simon Praetorius commented on patch set 9 08/20/25, 11:30

    Reply Unresolved

    From the perspective of a Fluid maintainer, I also agree that it's a good idea to decouple FluidEmail (and the associated templates that use translation etc.) from the InstallTool. While it would be nice to have a separate "email template testing tool" for the backend, you could always use the backend password reset for that while this feature doesn't exist. This should provide integrators with a realistic test mail (including template, images, translations...).
  12. Christian Kuhn voted on patch set 9 CR +1 08/20/25, 11:47

  13. Christian Kuhn commented on patch set 9 08/20/25, 12:19

    This change is ready for review.
  14. Christian Kuhn voted on patch set 9 CR 0 08/20/25, 13:14

  15. Oliver Klee voted on patch set 9 CR +1 08/20/25, 13:28

  16. Garvin Hicking commented on patch set 9 08/20/25, 13:28

    please let me try to find a place for a fluidMail message testing before we merge this. I'll work on it with high prio the next days.
  17. Garvin Hicking commented on patch set 9 08/21/25, 18:21

    Reply Unresolved

    I've pushed an alternate approach on this: https://review.typo3.org/c/Packages/TYPO3.CMS/+/90461 This would now by default focus on sending a raw message while preserving the ability to preview a FluidMail SystemEmail template along a language/site switch. To me, this would act as an interim solution until we properly implement site-specific Mail-settings and can move the testing of FluidMails there. That'll be v14 only though and a lot of work.
  18. Stefan Froemken commented on patch set 9 CR +1 08/22/25, 07:53

    I definitely prefer this solution here
  19. Garvin Hicking voted on patch set 9 CR -1 08/22/25, 08:27

  20. Benni Mack updated the commit message in patch set 10 CR +1 04/22/26, 06:32

  21. core-ci voted on patch set 10 V -1 04/22/26, 07:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100724

  22. Christian Kuhn wrote 06/18/26, 23:12

    Removed reviewer Christian Kuhn.
  23. Benni Mack commented on patch set 10 09/01/26, 21:26

    Unresolved

    FYI: This is fixed on main due to a lot of clean up wit DI and wiring. We can now send out Fluid-based emails in general. If needed, I can provide a custom HTML email as test-case...
  24. Benni Mack commented on patch set 10 09/01/26, 21:27

    Unresolved

    One more option for this change would be to have 2 buttons: send plain email, send templated email
  25. Benni Mack abandoned the change 11/10/26, 14:00

    Abandoning, the reported problem no longer exists on main and 14.3.