Project

General

Profile

Actions

Task #88423

closed

Make MailMessage::initializeMailer() protected, so it can be overwritten

Added by Anonymous over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Won't have this time
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2019-05-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
swift mail plugin
Complexity:
no-brainer
Sprint Focus:

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.

Actions

Also available in: Atom PDF