User tests: Successful: Unsuccessful:
Pull Request for Issue #37933.
When System, Mail Templates, Options, “Per Template Mail Settings” is set to Yes the mail templates feature ignores each individual mail template's “Set Mail” option if the latter is set to No. As a result, setting “Per Template Mail Settings” to Yes requires that all email templates duplicate the mailer configuration from the site's Global Configuration.
This PR fixes this problem by making each individual email template's “Set Mail” setting actually work.
I also changed the default value of the “Set Mail” to No because it is unlikely that you want to override every single customised mail template's mailer settings. In all likelihood you are customising a lot of mail templates to fit your branding but you only want custom mail settings (typically to implement a different sender or reply to address) for a small subset of them, e.g. the mail templates which are used to send out invoices / receipts on an e-commerce site. Having “Set Mail” enabled by default, in a secondary tab most people will miss, is a great way to make people think Joomla is broken and can't send emails...
php.ini
and set
[mail function]
sendmail_path=/usr/local/foobar
Error message, e.g.:
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
A test email is sent using the Global Configuration settings.
None.
This has been broken ever since the introduction of the Mail Templates feature in Joomla 4 back in September 2019.
Hat tip to my client, EJ, for reporting this problem and letting me use a backup of his site to verify the conditions which trigger it.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Libraries |
@richard67 Sure. I also made the commit comment so it auto-closes the issue when the PR is merged ;)
@richard67 Sure. I also made the commit comment so it auto-closes the issue when the PR is merged ;)
@nikosdion Well here in this repo we close an issue as soon as a PR is made, not when it is merged. It was always like that as far as I remember since we are on GitHub.
@richard67 Yup, I know. I always add a reference to the issue when submitting a PR against an issue to save a future developer running git blame
yet another step in understanding why this code exists / was changed. A necessity born out of personal frustration, if you like. Since it doesn't break anything I keep doing it
I have tested this item
Tested successfully in Joomla 4.1.5-dev of 1 June in Wampserver 3.2.9 using PHP 8.1.6.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-06-05 22:31:56 |
Closed_By | ⇒ | bembelimen | |
Labels |
Added:
?
|
Thx
Thank you for the merge!
I have tested this item✅ successfully on 71ac7bb
It works! Tested on 4.2 by changing the lines of code according to the PR.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37948.