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
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-11-25 10:26:21 |
Closed_By | ⇒ | chmst |
Closing as this is not a joomla core. https://support.google.com/mail/thread/210192174/how-to-authenticate-dkim-or-spf?hl=en
Maybe you can ask for support on https://forum.joomla.org
As Christiane mentioned, this is not a Joomla issue, anyway please don't use php mail function, use smtp instead.
As Christiane mentioned, this is not a Joomla issue, anyway please don't use php mail function, use smtp instead.
The reason to use SMTP is that your SMTP server (if configured correctly) adds a DKIM signature to your outgoing emails.
Gmail requires all senders to authenticate with either SPF or DKIM.
The PHP mail and sendmail methods don't add a DKIM signature.
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.