[TASK] Mailutility: Update logic to set sender for TYPO3 > 10

This commit is contained in:
Philipp Dieter 2024-05-28 10:00:21 +02:00
parent 6388fd7bb0
commit 5cf947a1da

View File

@ -218,12 +218,15 @@ class MailUtility
$mail = GeneralUtility::makeInstance(MailMessage::class); $mail = GeneralUtility::makeInstance(MailMessage::class);
if (version_compare(TYPO3_branch, '10.0', '>=')) { if (version_compare(TYPO3_branch, '10.0', '>=')) {
$mail->subject($subject); $mail->subject($subject);
if ($sender) {
$mail->from($sender); $mail->from($sender);
}else { }
} else {
$mail->setSubject($subject); $mail->setSubject($subject);
if ($sender) {
$mail->setFrom($sender); $mail->setFrom($sender);
} }
}
$bodydataText = []; $bodydataText = [];
$bodydataHtml = []; $bodydataHtml = [];
foreach ($data as $row) { foreach ($data as $row) {