Go to Global Configuration - Server - Mail.
Enter an email address into 'Reply To' and a name into 'Reply To Name'.
Click 'Send Test Mail'.
The received email should have the reply-to header with the name and the email address in the format
Reply-To: Firstname Surname mailbox@example.com.
The Reply-To header is missing from the received email, as shown in the first screenshot.
Joomla 4.1.3-dev on Wampserver 3.2.7 using PHP 7.4.26.
Using smtp.gmail.com as SMTP server.
In Joomla 3.10.8 in the same system the received message includes the Reply-To header, as shown in the second screenshot.
This issue was reported at the Joomla support forum (https://forum.joomla.org/viewtopic.php?f=811&t=992972 "Joomla 4 'Reply To' / 'Reply To Name' Issue")
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
The original report in the Joomla forum mentions "when "Reply to Email" / "Reply to Name" are set, they are not coded by Joomla 4 in the test message or any of Joomla 4 email templates."
I verified this by testing the Account Details message for a new user in Joomla 4.1.3-dev and Joomla 3.10.8.
Just a guess but maybe the issue originates from the processing of the email templates, introduced in Joomla 4.
Title |
|
Yeah, there a diference, J3 use $mail->sendMail()
, wich care about ReplyTo:
joomla-cms/libraries/src/Mail/Mail.php
Lines 737 to 763 in 8be66eb
However in J4 we use MailTemplate that use own send()
method, where global ReplyTo is ignored:
joomla-cms/libraries/src/Mail/MailTemplate.php
Lines 292 to 295 in ac61e60
Labels |
Added:
bug
|
@Fedik thank you for the explanation. Shouldn't Mail Templates behave the same way as mail in Joomla 3 and use the global settings Reply To and Reply To Name?
I also think it should use global setings when "local" not exists for ReplyTo.
Labels |
Added:
J4 Issue
|
Hi,
Is there a way to know when that bug will be corrected? It is still the same problem with Joomla version 4.2.8
Thanks
@cathelin45 no indication until one of the developers creates a Pull Request (PR). Two successful tests are required before the fix is included in the next version.
A related issue was reported today with the current version of VirtueMart, 4.0.12.10777. VirtueMart sets the Reply-To header by calling the function addReplyTo() in libraries/src/Mail/Mail.php, which then passes the details to the addReplyTo() function in the PHPMailer library, but PHPMailer rejects the email address:
0 - Invalid address: (Reply-To)
I will try to test this last use case with VirtueMart, narrow it down and get more details. The forum topic is
Issue with Reply-To address in PHPMailer with VirtueMart
It turns out that the Reply-To email address forwarded by VirtueMart's Recommend to Friend form via Joomla addReplyTo() to addReplyTo() in PHPMailer must have been blank, which explains the error message.
@Fedik @cathelin45,
Just tested a patch in Joomla 4.2.8-dev (shouldn be called 4.2.9-dev?) of 19 February. It worked with the Sent Test Mail and the Forgot Your Password email.
libraries/src/Mail/MailTemplate.php lines 279-281:
if ($this->replyto) {
$this->mailer->addReplyTo($this->replyto->mail, $this->replyto->name);
}
change to:
if ($this->replyto) {
$this->mailer->addReplyTo($this->replyto->mail, $this->replyto->name);
} elseif ($app->get('replyto')) {
$this->mailer->addReplyTo($app->get('replyto'), $app->get('replytoname'));
}
```<hr /><sub>This comment was created with the <a href="https://github.com/joomla/jissues">J!Tracker Application</a> at <a href="https://issues.joomla.org/tracker/joomla-cms/37473">issues.joomla.org/tracker/joomla-cms/37473</a>.</sub>
@Fedik would you like to create a PR from that? I do not have the tools or skills to do that.
I will try over the week, if no one will be faster
@Fedik thank you!
On Mon, Feb 20, 2023, 12:25 AM Fedir Zinchuk @.***>
wrote:
I will try over the week, if no one will be faster
—
Reply to this email directly, view it on GitHub
#37473 (comment),
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAI64J2VRPIBD6HYJEMMWOTWYINMRANCNFSM5SOKI3OA
.
You are receiving this because you were mentioned.Message ID:
@.***>
Thank you!
Hi Toivo,
Many thanks for that. "Reply to" is now correctly coded with you patch; it now works alright.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-02-20 09:32:03 |
Closed_By | ⇒ | Fedik |
Screenshots from received email in Joomla 4.1.3-dev and Joomla 3.10.8:
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37473.