# Email::Processor 不应以 mail=nil 调用

**URL:** https://meta.discourse.org/t/email-processor-does-not-expect-to-be-called-with-mail-nil/258428
**Category:** Bug
**Tags:** email
**Created:** [2023年三月16日 21:31 UTC](https://meta.discourse.org/t/email-processor-does-not-expect-to-be-called-with-mail-nil/258428 "2023-03-16T21:31:33Z")
**Posts on this page:** 1
**Showing post:** 17

<div class="post-metadata">

### Author: ![davidb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidb/32/554671_2.png) [@davidb](https://meta.discourse.org/u/davidb)
#### Post date: [2023年五月18日 04:40 UTC](https://meta.discourse.org/t/email-processor-does-not-expect-to-be-called-with-mail-nil/258428/17 "2023-05-18T04:40:38Z")

</div>

我已经更新以防止 `is_bounce?` 引起的错误。

有一个用于跟踪邮件日志的站点设置：

```plaintext
SiteSetting.log_mail_processing_failures
将所有邮件处理失败记录到 /logs

```

如果启用此设置，空白邮件错误仍会出现在邮件日志中，但不会像现在这样导致作业失败。我已在此处添加了提交详细信息以供参考：

> <https://github.com/discourse/discourse/commit/1de8361d2e4309df097d33381d885df9cbbd3b93>
>
> Currently processing emails that are blank or have a nil value for the mail will… cause several errors.
> 
> This update allows emails with blank body or missing sender to log the blank email error to the mail logs rather than throwing an error.

---

_[View the full topic](https://meta.discourse.org/t/email-processor-does-not-expect-to-be-called-with-mail-nil/258428)._
