# Email notifications fail if duplicate headers exist

**URL:** <https://meta.discourse.org/t/email-notifications-fail-if-duplicate-headers-exist/222960>\
**Category:** Bug\
**Created:** [April 2, 2022, 9:33pm UTC](https://meta.discourse.org/t/email-notifications-fail-if-duplicate-headers-exist/222960 "2022-04-02T21:33:09Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![wusel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wusel/32/255451_2.png) [@wusel](https://meta.discourse.org/u/wusel)\
**Post date:** [April 12, 2022, 10:08am UTC](https://meta.discourse.org/t/email-notifications-fail-if-duplicate-headers-exist/222960/13 "2022-04-12T10:08:00Z")

</div>

Oh, nice — yes, it does:

 ![Screenshot 2022-04-12 at 11-13-26 Logs](https://global.discourse-cdn.com/meta/original/4X/5/4/f/54f3bdc5f28818243c66526a9c745e9dbf1cf8c8.png)

So, if I understand this correctly,

```plaintext
 433 def header_value(name)
 434 header = @message.header[name]
 435 return nil unless header
*436 header.value
 437 end

```

is – in the Discource code? – where Sidekiq bails out?

This is called from …

```plaintext
 228 MessageBuilder.custom_headers(SiteSetting.email_custom_headers).each do |key, _|
*229 value = header_value(key)
 230
 231 # Remove Auto-Submitted header for group private message emails, it does
 232 # not make sense there and may hurt deliverability.

```

So it could be a custom header?

I indeed do have an entry there:

![Screenshot 2022-04-12 at 11-27-31 Administration - Freifunk Kreis GT](https://global.discourse-cdn.com/meta/optimized/4X/e/7/c/e7c659db260c0b4b1a9382a364eae4266ea6e755_2_690x59.png)

I’ve reset this to defaults, and … actually it seems that email notifications are indeed been sent out again, as verified by readers.

Thanks!

One question remains, though: Why is »Auto-Submitted: auto-generated|Precedence: bulk« causing this failure? It states that custom headers shall be seperated by »|«.

---

_[View the full topic](https://meta.discourse.org/t/email-notifications-fail-if-duplicate-headers-exist/222960)._
