如何仅清除已退回和被拒绝的邮件日志?
通过 rails 控制台,您可以执行
EmailLog.where(bounced: true).destroy_all
4 个赞
这很棒。但是,如果我将“rejected”替换为“rejected”,则会引发错误。
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR: column email_logs.rejected does not exist
也许那只对未来的情况有效。旧的被拒绝的仍然存在。
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
