- Issue created by @fonant
- ๐ฌ๐งUnited Kingdom fonant
I've hacked a workaround for line 111 of commerce_email/src/EmailSender.php, which I think will fix the problem:
'reply-to' => $this->replaceTokens(($email->getReplyTo() ?? ''), $replacements),
Maybe we need an update function to add empty ReplyTo strings for older orders?
- ๐ฌ๐งUnited Kingdom fonant
Doh! Of course the other way to fix this is to edit each email definition at /admin/commerce/config/emails and just re-save each one.
- ๐ฎ๐ณIndia chetan 11
chetan 11 โ made their first commit to this issueโs fork.
- Status changed to Needs review
9 months ago 12:55pm 8 February 2024 - ๐บ๐ฆUkraine marchuk.vitaliy Rivne, UA
vmarchuk โ made their first commit to this issueโs fork.
- ๐บ๐ฆUkraine marchuk.vitaliy Rivne, UA
Yeah, I just reproduced it too. In the getReplyTo() method we need to use the default value and that's it.
MR updated with fixes. - ๐ฎ๐ฑIsrael jsacksick
I think the right fix would be to change the code from:
$params = [ 'id' => 'commerce_email_' . $email->id(), 'from' => $this->replaceTokens($email->getFrom(), $replacements), 'cc' => $this->replaceTokens($email->getCc(), $replacements), 'bcc' => $this->replaceTokens($email->getBcc(), $replacements), 'reply-to' => $this->replaceTokens($email->getReplyTo(), $replacements), ];
to:
$params = [ 'id' => 'commerce_email_' . $email->id(), 'from' => $this->replaceTokens($email->getFrom(), $replacements), 'cc' => $this->replaceTokens($email->getCc(), $replacements), 'bcc' => $this->replaceTokens($email->getBcc(), $replacements), ]; $reply_to = $email->getReplyTo(); if (!empty($reply_to) { $params['reply-to'] = $reply_to; }
- Status changed to Fixed
9 months ago 2:44pm 8 February 2024 Automatically closed - issue fixed for 2 weeks with no activity.