No Code Attached Yet
avatar laoneo
laoneo
8 Jan 2026

Steps to reproduce the issue

Run the following code:

$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();

Expected result

The From header in the mail is test@example.com.

Actual result

The From header in the mail is the global from option from the global configuration.

System information (as much as possible)

Bug is since #46431 got merged and shipped with 5.4.2.

Additional comments

If other extension developers come across this issue, the fix is:

if ($mailer instanceof Mail) {
	$mailer->Sender = $mailer->From;
}
avatar laoneo laoneo - open - 8 Jan 2026
avatar joomla-cms-bot joomla-cms-bot - change - 8 Jan 2026
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Jan 2026
avatar laoneo laoneo - change - 8 Jan 2026
The description was changed
avatar laoneo laoneo - edited - 8 Jan 2026
avatar laoneo
laoneo - comment - 8 Jan 2026

I'm not sure how to fix this without reverting the original pr and not introduce another bc break.

avatar laoneo laoneo - change - 8 Jan 2026
The description was changed
avatar laoneo laoneo - edited - 8 Jan 2026
avatar alikon alikon - change - 8 Jan 2026
Status New Closed
Closed_Date 0000-00-00 00:00:00 2026-01-08 17:13:53
Closed_By alikon
avatar alikon alikon - close - 8 Jan 2026
avatar alikon
alikon - comment - 8 Jan 2026

closing as we have a PR #46644

Add a Comment

Login with GitHub to post a comment