Answers.Body: <p>There are two options.</p>
  <ul>
  <li>If you have access to the bounce mailbox, log in manually and move the problematic email to the &quot;CiviMail.ignored&quot; folder (or just delete it).</li>
  <li>If you don't have access to the bounce mailbox (e.g. it's on Google, and you only have the CiviCRM app password), find this snippet of code in <code>CRM/Utils/Mail/EmailProcessor.php</code>:</li>
  </ul>
  <pre><code>    // process fifty at a time, CRM-4002
      while ($mails = $store-&gt;fetchNext(MAIL_BATCH_SIZE)) {
        foreach ($mails as $key =&gt; $mail) {
  </code></pre>
  <p>Directly after the <code>foreach</code> line, put this line in:</p>
  <pre><code>$store-&gt;markIgnored($key); die;
  </code></pre>
  <p>Then manually run the Bounced Messages scheduled job.  The job will move the next email (which will be the &quot;stuck&quot; one) to <code>CiviMail.ignored</code>.  Then remove the line and on the next run mail will continue as usual.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-24T17:17:53.397Z
Answers.LastActivityDate: 2023-10-24T17:17:53.397Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I'm using a traditional mail account for bounce processing.  I have an email that causes the Scheduled Job to fail.  How can I address this?</p>
  
Tags: <civimail><bounce><bounce-processing>
Title: How do I deal with a stuck bounce/email-to-activity queue?
ThreadText: # How do I deal with a stuck bounce/email-to-activity queue?
  
  (Asked by: username_0 on 2023-10-24)
  
  I'm using a traditional mail account for bounce processing. I have an email that causes the Scheduled Job to fail. How can I address this?
  
  **Tags:** civimail, bounce, bounce-processing
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-10-24. Score: 3
  
  There are two options.
  
  * If you have access to the bounce mailbox, log in manually and move the problematic email to the "CiviMail.ignored" folder (or just delete it).
  * If you don't have access to the bounce mailbox (e.g. it's on Google, and you only have the CiviCRM app password), find this snippet of code in `CRM/Utils/Mail/EmailProcessor.php`:
  
  ```
      // process fifty at a time, CRM-4002
      while ($mails = $store->fetchNext(MAIL_BATCH_SIZE)) {
        foreach ($mails as $key => $mail) {
  
  ```
  
  Directly after the `foreach` line, put this line in:
  
  ```
  $store->markIgnored($key); die;
  
  ```
  
  Then manually run the Bounced Messages scheduled job. The job will move the next email (which will be the "stuck" one) to `CiviMail.ignored`. Then remove the line and on the next run mail will continue as usual.
  
  
  ---
  
  