# 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:** 1

<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 2, 2022, 9:33pm UTC](https://meta.discourse.org/t/email-notifications-fail-if-duplicate-headers-exist/222960/1 "2022-04-02T21:33:09Z")

</div>

See [Email notifications fail if duplicate headers exist - #14 by simonk](https://meta.discourse.org/t/email-notifications-fail-if-duplicate-headers-exist/222960/14) for bug description  
Above added by @pfaffman

## Original text follows

Hello,

I’m running a rather small Discourse installation for some years now. It’s fairly low traffic, hence it took a while to notice that sending of emails (notifications, digests) obvoiusly began to fail some months ago. Forensics point to the upgrade to 2.8.0.beta7 around 2022-10-22, previously we were at 2.8.0.beta4. At least I haven’t received any email from that installation about posts or messages.

The emails pile up in Sidekiq, with a message I can’t relate to, nor find anything fitting when searching for it — there where reports of `undefined method` messages, but none of the conditions match mine. (It’s not TLS, it’s no timeout to the mail server, it’s not the events plugin, and the secure media fix should be in already — besides, the exact error messages were different.)

Error in Sidekiq:

```
Wrapped NoMethodError: undefined method `value' for #<Array:0x00007f7fd5277d68> Did you mean? values_at

```

The part after `#<Array:` is different for each held email. I reinstalled Discourse to a new VM last night and restored from a fresh backup — but seemingly the email issue was restored with the data 🤔

As the error rate started to climb end of October, I’m rather sure this was introduced by 2.8.0.beta7:

 ![Screenshot at 2022-04-02 22-51-45](https://global.discourse-cdn.com/meta/original/3X/0/1/01fb94d5b2c436ae14e2ea4a41b0953e08697f78.png)

Any help, or hint to debug the issue further, is much appreciated.

---

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