Issue Feature Closed

#97747Use MailerInterface instead of Mailer

Jeroen Schutte 06/08/22, 08:55 updated 12/06/22, 21:38

Description

There are several examples where an instance of Mailer is used, where it should be MailerInterface due to low coupling and DI.

GeneralUtility::makeInstance(Mailer)
GeneralUtility::makeInstance(MailerInterface)

We want this because we created our own implementation of MailterInterface and discovered that (for instance) PasswordReset did not use the new implementation.

List of classes where Mailer is uses (probably incomplete):
  • EmailFinisher
  • AuthenticationService
  • EnvironmentController
  • ValidatorTask
  • SystemStatusUpdateTask
  • StateChangeNotification

Reviews 4