PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar TLWebdesign
TLWebdesign
8 Jan 2026

Pull Request for Issue #46643 .

Summary of Changes

We're not just calling the setFrom function form PHP Mailer but we are also setting the Sender variable when we call setSender function from the Mail class. This makes sure when we override the sender information thru setSender this does not get undone by the createMailer function in the MailerFactory class. (the change introduced in PR #46431.

Testing Instructions

send e-mail via an extension like this:

$mailer = Factory::getContainer()->get(MailerFactoryInterface::class)->createMailer();
$mailer->setSender('test@example.com');
$mailer->addRecipient('me@example.com');
$mailer->setSubject('Test');
$mailer->setBody('Test body');
$mailer->send();

or any other way but setSender should be set to set a custom sender.

Actual result BEFORE applying this Pull Request

The e-mail address from the global configuration is used. as the "Envelope sender".

Expected result AFTER applying this Pull Request

The e-mail address set using the setSender function is used instead.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar TLWebdesign TLWebdesign - open - 8 Jan 2026
avatar TLWebdesign TLWebdesign - change - 8 Jan 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Jan 2026
Category Libraries
avatar TLWebdesign
TLWebdesign - comment - 8 Jan 2026

We need some smart people to confirm this is a legitimate fix. Not just two human tests.

avatar laoneo laoneo - change - 8 Jan 2026
Labels Added: PR-5.4-dev
avatar tecpromotion tecpromotion - change - 8 Jan 2026
Title
Fix PHP Mailer defaulting to global configuration e-mail address
[5.4] Fix PHP Mailer defaulting to global configuration e-mail address
avatar tecpromotion tecpromotion - edited - 8 Jan 2026
avatar laoneo laoneo - test_item - 8 Jan 2026 - Tested successfully
avatar laoneo
laoneo - comment - 8 Jan 2026

I have tested this item ✅ successfully on d603cb9

System tests are passing without my workaround in DPCalendar


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

avatar richard67
richard67 - comment - 13 Jan 2026

We have another issue now which might make it necessary to revert the initial PR. See this comment there (and further comments below that): #46431 (comment)

Add a Comment

Login with GitHub to post a comment