Project

General

Profile

Actions

Bug #93088

closed

TYPO3 10 $mail->send() won't send mails via cron (Symfony MailMessage)

Added by Aristeidis Karavas over 3 years ago. Updated over 2 years ago.

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 #1

Updated by Simon Gilli over 3 years ago

  • Category changed from scheduler to Miscellaneous
  • Assignee set to Simon Gilli
  • Is Regression set to Yes
Actions #2

Updated by Simon Gilli about 3 years ago

  • Category changed from Miscellaneous to Mailer API
Actions #3

Updated by Markus Klein over 2 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.

Actions #4

Updated by Benni Mack over 2 years ago

  • Status changed from Needs Feedback to Closed

Closing this issue now, due to lack of feedback. Thanks for testing Markus!

Actions

Also available in: Atom PDF