Install Joomla as default.
Global Configuration -> Server -> Mailer = "PHP Mail".
"Forgot your password" unable to send email.
Email should be sent
No email is sent
Joomla 5.0
Red Hat RHEL 9
The cause
In file libraries/src/Mail/MailerFactory.php, line 83
if ($mailer->setFrom($mailfrom, MailHelper::cleanLine($fromname), false) === false) {
needs to be changed to
if ($mailer->setFrom($mailfrom, MailHelper::cleanLine($fromname), true) === false) {
The php "mail" needs $additional_params = "-fsupport@mydomain.com"
mail( string $to, string $subject, string $message, array|string $additional_headers = [], string $additional_params = "" ): bool
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
bug
|
Looking at the maillog, without the $additional_params = "-fsupport@mydomain.com", the sender email becomes
from=apache@T140.localdomain
The email is then rejected by gmail-smtp-in.l.google.com with message
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42222.