Answers.Body: <p>After some more investigation, this issue was caused by having an outdated version of flexmailer installed in the extensions directory.</p>
  <p>Flexmailer is now distributed with the core CRM, so having a separate extension installed is not necessary---and in this case resulted in outdated code being used since the extensions were using the old version rather than the version distributed with civicrm.</p>
  <p>I had to jump through some hoops to delete the old extension from the extensions directory (just deleting it caused a fatal error from mosaico, so I had to disable mosaico, THEN delete the old flexmailer verseion from the extensions directory, then enable mosaico again), but mailings seem to be working now.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-04-16T16:58:33.853Z
Answers.LastActivityDate: 2024-04-16T16:58:33.853Z
Answers.UserDisplayName: user15932
Body: <p>Upgraded to Civi 5.71.2 from 5.70.2.  Scheduled mailing (a monthly newsletter) to send immediately.  The Send Scheduled Mailings Job runs, but does not finish (and does not show any sort of error message in the Scheduled Jobs Log or the full Error Log).</p>
  <p>I restored back to 5.70.2, and scheduled a mailing, and it sent as expected. The only changes to the environment were the core CRM version---no extension changes since they were all up to date before upgrading to 5.71.2.</p>
  <p>Based on warnings I found in the Error Log (below), it looks like something happens with fireWalkBatches and the scheduled job never gets to fireComposeBatch or fireSendBatch on 5.71.2.</p>
  <p>Platform is PHP 8.1 / Wordpress.</p>
  <p><strong>Warnings in Error Log</strong></p>
  <p><strong>5.71.2</strong> - I found the following warnings show up at the time the Send Scheduled Mailings job runs:</p>
  <pre><code>[warning] \Symfony\Component\EventDispatcher\Event is deprecated. Consider using \Civi\Core\Event\GenericHookEvent. For more information see https://docs.civicrm.org/dev/en/latest/hooks/usage/symfony/#events Caller: Civi\FlexMailer\FlexMailer::fireWalkBatches
  [warning] \Symfony\Component\EventDispatcher\Event is deprecated. Consider using \Civi\Core\Event\GenericHookEvent. For more information see https://docs.civicrm.org/dev/en/latest/hooks/usage/symfony/#events Caller: Civi\FlexMailer\FlexMailer::fireRun 
  </code></pre>
  <p><strong>5.70.2</strong> - Whereas the Error Log shows the following warnings for the Send Scheduled Mailings job under 5.70.2:</p>
  <pre><code>[warning] \Symfony\Component\EventDispatcher\Event is deprecated. Consider using \Civi\Core\Event\GenericHookEvent. For more information see https://docs.civicrm.org/dev/en/latest/hooks/usage/symfony/#events Caller: Civi\FlexMailer\FlexMailer::fireSendBatch
  [warning] \Symfony\Component\EventDispatcher\Event is deprecated. Consider using \Civi\Core\Event\GenericHookEvent. For more information see https://docs.civicrm.org/dev/en/latest/hooks/usage/symfony/#events Caller: Civi\FlexMailer\FlexMailer::fireComposeBatch 
  [warning] \Symfony\Component\EventDispatcher\Event is deprecated. Consider using \Civi\Core\Event\GenericHookEvent. For more information see https://docs.civicrm.org/dev/en/latest/hooks/usage/symfony/#events Caller: Civi\FlexMailer\FlexMailer::fireWalkBatches
  [warning] \Symfony\Component\EventDispatcher\Event is deprecated. Consider using \Civi\Core\Event\GenericHookEvent. For more information see https://docs.civicrm.org/dev/en/latest/hooks/usage/symfony/#events Caller: Civi\FlexMailer\FlexMailer::fireRun 
  </code></pre>
  
Tags: <civimail><flexmailer>
Title: Scheduled Mailings not sending in Civi 5.71.2 after upgrade from 5.70.2
ThreadText: # Scheduled Mailings not sending in Civi 5.71.2 after upgrade from 5.70.2
  
  (Asked by: username_0 on 2024-03-31)
  
  Upgraded to Civi 5.71.2 from 5.70.2.  Scheduled mailing (a monthly newsletter) to send immediately.  The Send Scheduled Mailings Job runs, but does not finish (and does not show any sort of error message in the Scheduled Jobs Log or the full Error Log).
  I restored back to 5.70.2, and scheduled a mailing, and it sent as expected. The only changes to the environment were the core CRM version---no extension changes since they were all up to date before upgrading to 5.71.2.
  Based on warnings I found in the Error Log (below), it looks like something happens with fireWalkBatches and the scheduled job never gets to fireComposeBatch or fireSendBatch on 5.71.2.
  Platform is PHP 8.1 / Wordpress.
  Warnings in Error Log
  5.71.2 - I found the following warnings show up at the time the Send Scheduled Mailings job runs:
  [warning] \Symfony\Component\EventDispatcher\Event is deprecated. Consider using \Civi\Core\Event\GenericHookEvent. For more information see https://docs.civicrm.org/dev/en/latest/hooks/usage/symfony/#events Caller: Civi\FlexMailer\FlexMailer::fireWalkBatches
  [warning] \Symfony\Component\EventDispatcher\Event is deprecated. Consider using \Civi\Core\Event\GenericHookEvent. For more information see https://docs.civicrm.org/dev/en/latest/hooks/usage/symfony/#events Caller: Civi\FlexMailer\FlexMailer::fireRun 
  
  5.70.2 - Whereas the Error Log shows the following warnings for the Send Scheduled Mailings job under 5.70.2:
  [warning] \Symfony\Component\EventDispatcher\Event is deprecated. Consider using \Civi\Core\Event\GenericHookEvent. For more information see https://docs.civicrm.org/dev/en/latest/hooks/usage/symfony/#events Caller: Civi\FlexMailer\FlexMailer::fireSendBatch
  [warning] \Symfony\Component\EventDispatcher\Event is deprecated. Consider using \Civi\Core\Event\GenericHookEvent. For more information see https://docs.civicrm.org/dev/en/latest/hooks/usage/symfony/#events Caller: Civi\FlexMailer\FlexMailer::fireComposeBatch 
  [warning] \Symfony\Component\EventDispatcher\Event is deprecated. Consider using \Civi\Core\Event\GenericHookEvent. For more information see https://docs.civicrm.org/dev/en/latest/hooks/usage/symfony/#events Caller: Civi\FlexMailer\FlexMailer::fireWalkBatches
  [warning] \Symfony\Component\EventDispatcher\Event is deprecated. Consider using \Civi\Core\Event\GenericHookEvent. For more information see https://docs.civicrm.org/dev/en/latest/hooks/usage/symfony/#events Caller: Civi\FlexMailer\FlexMailer::fireRun
  
  **Tags:** civimail, flexmailer
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2024-04-16. Score: 3 | Accepted answer
  
  After some more investigation, this issue was caused by having an outdated version of flexmailer installed in the extensions directory.
  
  Flexmailer is now distributed with the core CRM, so having a separate extension installed is not necessary---and in this case resulted in outdated code being used since the extensions were using the old version rather than the version distributed with civicrm.
  
  I had to jump through some hoops to delete the old extension from the extensions directory (just deleting it caused a fatal error from mosaico, so I had to disable mosaico, THEN delete the old flexmailer verseion from the extensions directory, then enable mosaico again), but mailings seem to be working now.
  
  
  ---
  
  