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.
Updated by Simon Gilli almost 4 years ago
- Category changed from scheduler to Miscellaneous
- Assignee set to Simon Gilli
- Is Regression set to Yes
Updated by Simon Gilli almost 4 years ago
- Category changed from Miscellaneous to Mailer API
Updated by Markus Klein about 3 years ago
- Status changed from New to Needs Feedback
- Assignee deleted (
Simon Gilli)
Just tested this on a current v10 and v11.
I sent via CLI bin/typo3 mailer:spool:send
.
Works for me.
Updated by Benni Mack almost 3 years ago
- Status changed from Needs Feedback to Closed
Closing this issue now, due to lack of feedback. Thanks for testing Markus!
Actions