Project

General

Profile

Actions

Task #88423

closed

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

Added by Anonymous almost 5 years ago. Updated almost 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 #1

Updated by Gerrit Code Review almost 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60803

Actions #2

Updated by Gerrit Code Review almost 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60803

Actions #3

Updated by Anonymous almost 5 years ago

  • Tracker changed from Feature to Task
  • TYPO3 Version set to 10
Actions #4

Updated by Gerrit Code Review almost 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60803

Actions #5

Updated by Gerrit Code Review almost 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60803

Actions #6

Updated by Anonymous almost 5 years ago

  • Priority changed from Should have to Won't have this time

I have abandoned my change. Please close this.

Actions #7

Updated by Björn Jacob almost 5 years ago

  • Status changed from Under Review to Closed

As requested by the author I am closing this issue. An alternative approach has been found and added to the abandoned review.

Actions

Also available in: Atom PDF