Feature PR-6.2-dev Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
24 Apr 2026
  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

The MailTemplate class should work with an injected MailerInterface and not concrete implementation to be more flexible. Additionally this pr deprecates the optional parameter to be able to remove the deprecated Factory usage.

Testing Instructions 1

  • Log in on the back end
  • Got to the global configuration server tab
  • Send a test mail

Actual result BEFORE applying this Pull Request

Mail is sent.

Expected result AFTER applying this Pull Request

Mail is sent.

Testing Instructions 2

  • Log in on the back end
  • Set HTML as mail format on /administrator/index.php?option=com_config&view=component&component=com_mails
  • Create a new user and enable Receive System Emails
  • Create a GET request task with the url https://downloads.joomla.org/api/v1/latest/cms and Manual execution as Execution Rule
  • In the advanced tab of the task form enable success notification and the respective user group from the previously created user image
  • Save the task
  • Click on the "Run Task"

Actual result BEFORE applying this Pull Request

Mail is sent with attachment in HTML format.

Expected result AFTER applying this Pull Request

Mail is sent with attachment in HTML format.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org: joomla/Manual#620

  • No documentation changes for manual.joomla.org needed

avatar laoneo laoneo - open - 24 Apr 2026
avatar laoneo laoneo - change - 24 Apr 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Apr 2026
Category Libraries
avatar laoneo laoneo - change - 24 Apr 2026
The description was changed
avatar laoneo laoneo - edited - 24 Apr 2026
avatar CSGoat0 CSGoat0 - test_item - 24 Apr 2026 - Tested successfully
avatar CSGoat0
CSGoat0 - comment - 24 Apr 2026

I have tested this item ✅ successfully on a59506a

I followed the instructions, everything works fine.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47677.

avatar CSGoat0
CSGoat0 - comment - 24 Apr 2026

I have tested this item ✅ successfully on a59506a

I followed the instructions, everything works fine.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47677.

avatar exlemor exlemor - test_item - 24 Apr 2026 - Tested successfully
avatar exlemor
exlemor - comment - 24 Apr 2026

I have tested this item ✅ successfully on a59506a

I have tested this successfully! Thanks @laoneo!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47677.

avatar exlemor
exlemor - comment - 24 Apr 2026

I have tested this item ✅ successfully on a59506a

I have tested this successfully! Thanks @laoneo!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47677.

avatar richard67 richard67 - change - 24 Apr 2026
Status Pending Ready to Commit
Labels Added: Feature PR-6.2-dev
avatar richard67
richard67 - comment - 24 Apr 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47677.

avatar richard67
richard67 - comment - 24 Apr 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47677.

2f5f271 26 Apr 2026 avatar laoneo is
avatar laoneo laoneo - change - 26 Apr 2026
Labels Added: RTC
avatar joomdonation
joomdonation - comment - 27 Apr 2026

I would question about the valid of this PR. Maybe someone with stronger OPP background should look at this more carefully

  • You modified code to allow using MailerInterface but in the code of MailTemplate class, you have code to check for a concrete implement. Is MailerInterface incomplete ?
  • In terms of features, although the intent is support MailerInterface, any implementation which is not Mail class will loose the functions provided by MailTemplate (because you hard code the check with a concrete implement before calling certain code):
  • Loose the feature to use custom SMTP parameters for each mail template
  • Lose the feature to handle attachments as string
avatar laoneo
laoneo - comment - 27 Apr 2026

All it does is to support the interface and doesn't restrict to the Mail class as we should work with interfaces. If you need these parameters like isHTML, then extend from Mail class. But there is no point to not work with interfaces. If I have a plugin which redirects everything to a custom Mailer service or whatever, there is no need to configure SMTP, etc. This brings a lot of flexibility while not loosing any settings from before.

avatar joomdonation
joomdonation - comment - 27 Apr 2026

I think it just a fake support to interface because if you pass any implement of the interface which is not a Mail instance, you will loose the features of MailTemplate which I mentioned earlier. Plus the support interface while having to check for concrete implement seems not right to me.

That's what I see from looking at the change in this PR. I will leave it to other maintainers and release managers to look at it further and make final decision.

avatar laoneo
laoneo - comment - 27 Apr 2026

Due all respect, but your comment doesn't make sense at all. This is how support for the interface should be implemented in a backwards compatible way. Mailer instances which come from the factory doesn't have to be always a Mail class. If a plugin would implement it's own mailer (which is not a Mail class) and set it in the global container, then this code would badly break. When this gets merged, then we can convert the rest of the code away from Factory::getMailer, otherwise we will have to life forever with it.

avatar joomdonation
joomdonation - comment - 27 Apr 2026

Sorry, I do not see the point of supporting interface causing loosing features of MailTemplate. I have expressed my concerns in my earlier comments, it's normal that you do not agree or I am wrong. Let's wait for feedbacks from others.

avatar joomdonation
joomdonation - comment - 27 Apr 2026

Sorry, I do not see the point of supporting interface if it causes loosing features of MailTemplate. I have expressed my concerns in my earlier comments, it's normal that you do not agree or I am wrong. Let's wait for feedbacks from others.

avatar laoneo
laoneo - comment - 27 Apr 2026

No problem, don't expect it either.

avatar MacJoom
MacJoom - comment - 29 Apr 2026

I would like to have two new tests - with Html tested.

avatar MacJoom
MacJoom - comment - 29 Apr 2026

I would like to have two new tests @exlemor , @CSGoat0 - with Html tested.

avatar richard67 richard67 - change - 29 Apr 2026
Status Ready to Commit Pending
avatar richard67
richard67 - comment - 29 Apr 2026

Back to pending. See previous comment.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47677.
avatar richard67
richard67 - comment - 29 Apr 2026

Back to pending. See previous comment.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47677.
avatar MacJoom
MacJoom - comment - 29 Apr 2026

Please test attachments too.

avatar laoneo laoneo - change - 30 Apr 2026
The description was changed
avatar laoneo laoneo - edited - 30 Apr 2026
avatar laoneo
laoneo - comment - 30 Apr 2026

I'v updated the testing instructions with HTML and attachment test.

avatar laoneo laoneo - change - 30 Apr 2026
The description was changed
avatar laoneo laoneo - edited - 30 Apr 2026
avatar laoneo laoneo - change - 30 Apr 2026
Labels Removed: RTC
avatar joomla-cms-bot joomla-cms-bot - change - 30 Apr 2026
Category Libraries Libraries Front End Plugins
avatar joomla-cms-bot joomla-cms-bot - change - 13 May 2026
Category Libraries Front End Plugins Administration com_config Libraries Front End Plugins
avatar MacJoom
MacJoom - comment - 13 May 2026

We had some changes - @CSGoat0 , @exlemor could you test again - Thank you very much.

Add a Comment

Login with GitHub to post a comment