Actions
Bug #93088
closedTYPO3 10 $mail->send() won't send mails via cron (Symfony MailMessage)
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Mailer API
Target version:
-
Start date:
2020-12-16
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
10
PHP Version:
7.2
Tags:
scheduler, task
Complexity:
Is Regression:
Yes
Sprint Focus:
Description
I have the exact same code on a TYPO3 9 and TYPO3 10 installations.
$mail = GeneralUtility::makeInstance(MailMessage::class);
$mail->from(new Address($sender['email'], $sender['name']));
$mail->to(new Address($recipient['email'], $recipient['name']));
$mail->subject($subject);
$emailView->assignMultiple(
[
'logs' => $log,
'recipient' => $recipient
]
);
$emailBody = $emailView->render();
$mail->html($emailBody, 'text/html');
$mail->send();
If i run the Task on the Backend, it works on both version.
If i run it via cron or sh ./typo3CronTrigger then the - >send() command does not send the mail. I debugged everything up until the $mail ->html($emailBody, 'text/html'); and i see my debug on my terminal. If i debug the $mail variable after the ->send() command, it doesn't show anything because it breaks.
This happens only in TYPO3 10. In TYPO3 9 works just fine.
Actions