Feature Language Change NPM Resource Changed PR-6.2-dev Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
20 Mar 2026

Pull Request resolves #46419 .

  • 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

Allow to configure the email for Sender property of PHPMailer. This is used for Return Path.
When it is not present then the email of the server will be used. This leads to broken validation for SPF / DKIM settings.

This is replaces for:

Testing Instructions

Note: It may not work the same for all servers.
Example via "Google SMTP" Google will force account email as Return Path

Apply path.
Also please check testing description from #46431

Send test email with and without Sender.
And check e-mail headers of the received emails.

Actual result BEFORE applying this Pull Request

Return path always contain server email.

Expected result AFTER applying this Pull Request

Return path contain email you set in Sender field.

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: tbd
  • No documentation changes for manual.joomla.org needed
avatar Fedik Fedik - open - 20 Mar 2026
avatar Fedik Fedik - change - 20 Mar 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Mar 2026
Category Administration com_config Language & Strings JavaScript Repository NPM Change Libraries
avatar Fedik
Fedik - comment - 20 Mar 2026

@TLWebdesign please check

avatar exlemor
exlemor - comment - 20 Mar 2026

I just tested this during Friday PR Testing Group, and sadly I do not see it or understand it as working...

Probably due to my environment... or our testing.

What I do see is BEFORE and AFTER THE PR, there are 2 Return-Paths, one as Return-Path: and one as
Return-path:

The testing instructions also do not talk about the Sender Email (optional) field...

Perhaps some screenshots would be very helpful - thank you so much.

avatar Fedik Fedik - change - 20 Mar 2026
Labels Added: Feature Language Change NPM Resource Changed PR-6.2-dev
avatar Fedik
Fedik - comment - 20 Mar 2026

Probably due to my environment... or our testing.

Yes it is, it hard to make a test that will work for all.
This is very environment depend issue also very depend from used email provider.

The testing instructions also do not talk about the Sender Email (optional) field...

The field is a new feature in this PR.
Originally the fix was to use the same "Email From" also for "Sender Email", but turns out it is not very flexible.

avatar krishnagandhicode
krishnagandhicode - comment - 20 Mar 2026

I tested this locally using SMTP(Mailpit)

Before PR: on ‎6.2.0-alpha1-dev

My setup:
image

Results on "Send test mail"
image


After PR : I am using the prebuilt : 6.2.0-alpha1-dev+pr.47435

my setup:
image
Results on "Send test mail"
image


The Return-Path is same in the From address in both scenarios, ignoring the custom Sender email configuration. Is it possible the Test Email controller isn't fetching the new mail_sender param?

If my test needs some modification or I did anything wrong - let me know.

avatar Fedik
Fedik - comment - 20 Mar 2026

I think your SMTP does not allow customization of the return path in current configuration

avatar TLWebdesign
TLWebdesign - comment - 20 Mar 2026

This shouldn't concern smtp but phpmailer, right? With smtp the sender is always the smtp account. Will look and test it next week.

avatar Fedik
Fedik - comment - 20 Mar 2026

This shouldn't concern smtp but phpmailer, right?

It depend from what the email server allows you to do.

avatar krishnagandhicode
krishnagandhicode - comment - 20 Mar 2026

Results using PHP mailer.
image

and
Screenshot 2026-03-21 005330

If SMTP defaults to the account email, and local windows PHP mailer testing is blocked by the OS/environment how would you recommend we best verify this PR locally?

avatar brianteeman
brianteeman - comment - 20 Mar 2026

I'm very confused about this PR and more confused after reading this https://www.postmastery.com/about-the-return-path-header/

avatar Fedik
Fedik - comment - 21 Mar 2026

how would you recommend we best verify this PR locally?

You can check the property in PHP, like:

$mailer = Factory::getContainer()->get(MailerFactoryInterface::class)->createMailer();
dump($mailer->Sender);

This should show email you set in the configuration.

I'm very confused about this PR and more confused after reading this

The article from 2010, a lot has changed since then, a LOT.

Look.
You have website brian.website
Hosted on potato.hosting

When you send email from Joomla your email will contain:
From: email@brian.website
Return Path account123.email@potato.hosting

When email failed to delivery the email will bounce back to account123.email@potato.hosting

Additionally the SMTP server can signing your email with SPF/DKIM.
To do this it check the email domain (from Return Path) and DNS records for that domain, when there a match and DNS has a correct record then your email will be signed.
But because Return Path is email@potato.hosting and you cannot configure it in Joomla the signing will not work.

Also a lot depend from the Hosting itself, I mean from SMTP provider you use.

avatar brianteeman
brianteeman - comment - 21 Mar 2026

This bug report helped me understand this a little better PHPMailer/PHPMailer#2298

Add a Comment

Login with GitHub to post a comment