How to clear just the bounced and rejected mail logs?
via the rails console, you can do
EmailLog.where(bounced: true).destroy_all
4 Likes
That is great. But if I substitute ‘rejected’ an error is thrown.
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR: column email_logs.rejected does not exist
I think you should be able to control that just by changing the setting in admin -> all site settings -> delete rejected email after days
3 Likes
Maybe that only works going forward. The old rejected ones are still present.