#88423Make MailMessage::initializeMailer() protected, so it can be overwritten
Description
I want to make use of the Swift_Mailer plugin feature to be able to log SMTP connections.
Therefore I want to extend the TYPO3\CMS\Core\Mail\MailMessage class and prepare the Mailer it uses.
In line 51 there is
private function initializeMailer()
{
$this-mailer = ...
}
which I’d like to extend with $this->mailer->registerPlugin(), but unfortunately this method is private. So I have to overwrite send(), which does a whole bunch of things that I don’t want to just copy/paste in my own class.
I don’t think that initializeMailer() should be private. I will submit a patch to make it protected.