Title: auto delete not working
Last modified: August 26, 2021

---

# auto delete not working

 *  Resolved [Jim](https://wordpress.org/support/users/jwmc/)
 * (@jwmc)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/auto-delete-not-working-2/)
 * This is kind of a followup to the similar topic by [@jcornell](https://wordpress.org/support/users/jcornell/).
   I have emails up to 3 months old and auto delete is set for 4 weeks. I get the
   same error as jcornell posted, but also two accompanying PHP warnings:
 *     ```
       [26-Aug-2021 13:38:02 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 2 for query DELETE FROM wp75_mail_catcher_logs
                             WHERE id IN() made by do_action_ref_array('wp-mail-catcher_0'), WP_Hook->do_action, WP_Hook->apply_filters, WpMailCatcher\ExpiredLogManager::removeExpiredLogs, WpMailCatcher\Models\Logs::delete
       [26-Aug-2021 16:21:07 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/forestpa/public_html/wp-content/plugins/wp-mail-catcher/src/GeneralHelper.php on line 195
       [26-Aug-2021 16:21:07 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/forestpa/public_html/wp-content/plugins/wp-mail-catcher/src/GeneralHelper.php on line 206
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [JWardee](https://wordpress.org/support/users/wardee/)
 * (@wardee)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/auto-delete-not-working-2/#post-14831179)
 * Hi Jim,
 * This looks like the same issue you mentioned [here](https://wordpress.org/support/topic/db-error-due-to-auto-delete/#post-14652638).
   There’s currently an un-tested fix pending for the next patch which you can see
   [here](https://github.com/JWardee/wp-mail-catcher/issues/117). I’m going to close
   this topic as it’s a duplicate, feel free to respond to the issue on GitHub if
   needed.
 *  [titsmaker](https://wordpress.org/support/users/titsmaker/)
 * (@titsmaker)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/auto-delete-not-working-2/#post-14971349)
 * I am sorry to say that but the auto-delete feature is still not working for me
   even in 1.5.4.
 *  Thread Starter [Jim](https://wordpress.org/support/users/jwmc/)
 * (@jwmc)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/auto-delete-not-working-2/#post-14974427)
 * Same here, auto-delete not working for me. Currently it is set for 3 weeks and
   there are emails over a month old.
 *  [confusedneedhelp](https://wordpress.org/support/users/confusedneedhelp/)
 * (@confusedneedhelp)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/auto-delete-not-working-2/#post-15508893)
 * Same here. Auto delete does not work. I have no php errors in the log.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘auto delete not working’ is closed to new replies.

 * ![](https://ps.w.org/wp-mail-catcher/assets/icon.svg?rev=2221293)
 * [Mail logging - WP Mail Catcher](https://wordpress.org/plugins/wp-mail-catcher/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mail-catcher/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mail-catcher/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mail-catcher/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mail-catcher/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mail-catcher/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [confusedneedhelp](https://wordpress.org/support/users/confusedneedhelp/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/auto-delete-not-working-2/#post-15508893)
 * Status: resolved