#20330Send mails to different adresses per language (TSFE->sendFormmail)
Description
When trying to send an formular (CType: FORM) to different recipient addresses per localized content element, the mail has always been sent to the email adress filled in the default content element.
I give an example:
The default content element recipient address in the subheader field is “mail@address.com” and the recipient address of the french content element is “french@mail.com” the mails will always sent to “mail@address.com”.
This is because the “locationData” always points to the default content element.
This can be fixed by overlaying the record fields in the method tslib_fe.php->sendFormmail (btw. versioning should be enabled, too) – see attachment.- 2451 $locData = explode(‘:’,$locationData);
- 2452 $record = $this->sys_page->checkRecord($locData1,$locData2,1);
++++ // Language Overlay:
++++ if (is_array($record) && $this->sys_language_contentOL) {
++++ $record = $this->sys_page->getRecordOverlay($locData1, $record, $this->sys_language_content, $this->sys_language_contentOL);
++++ }
(issue imported from #M10946)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.