# Email-in to multiple groups

**URL:** https://meta.discourse.org/t/email-in-to-multiple-groups/169627
**Category:** Support
**Created:** [November 9, 2020, 4:39pm UTC](https://meta.discourse.org/t/email-in-to-multiple-groups/169627 "2020-11-09T16:39:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Parad0x](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@Parad0x](https://meta.discourse.org/u/Parad0x)
#### Post date: [November 9, 2020, 4:39pm UTC](https://meta.discourse.org/t/email-in-to-multiple-groups/169627/1 "2020-11-09T16:39:49Z")

</div>

### Problem summary

Incoming Email to multiple groups is only generating one new message for the first group.

### Invironment

- External: **One** POP3-Mailbox
- External: Multiple aliases for that **one** Mailbox ('group-a@domain.de, 'group-b@domain.de ,…)
- Discourse: Multiple discourse-groups with different configured emailadress for incoming emails

### Behavior

- External: One email to 'group-b@domain.de creates one email in the mailbox
- External: One email to multiple recipients ('group-a@domain.de + 'group-b@domain.de) creates one email in the mailbox with multiple recipients in the mailheader
- Discourse: Single incoming Emails with only one recipient ('group-c@domain.de) generate one new message for the right group ✅
- Discourse: Single incoming Email with multiple recipients generates one new message for **the first** group ⚠

### Example / Usecase

Sender 'a@external.de sends an email to 'b@external.de + 'group-a@doamin.de + 'group-b@domain.de.  
A few minutes later there is a new discourse message with group-a as recipient / member of the message. Group-b will not be notified and can not access the message.

* * *

I could’t find a setting like “handle each recipient separately”.  
Does someone else has the same Problem? Is it possible to implement such a setting or is there a workaround besinde useing multiple mailboxes (There is a monthly price per mailbox)

Please help. I’ve searched many hours now and am stucked in a dead end.

There is an old Topic [Email-in to multiple categories](https://meta.discourse.org/t/email-in-to-multiple-categories/35549) that has a similarly problem but not quite identical. On that old topic there should be many topics in different categories. In my scenario there should be one message for many groups. Like if you write a message manually and add multiple groups manally to that message. So everyone can reply on that one location.

* * *

P.S: I hat to mark all emails with ’ because I wasn’t allowed to use many links as new user. The mails are send without the ’

---

<div class="post-metadata">

### Author: ![Parad0x](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@Parad0x](https://meta.discourse.org/u/Parad0x)
#### Post date: [November 15, 2020, 12:03pm UTC](https://meta.discourse.org/t/email-in-to-multiple-groups/169627/2 "2020-11-15T12:03:07Z")

</div>

Does anyone has a tip? Even if there is no solution. Please point me in a direction 😉  
Do you need more info?

---

<div class="post-metadata">

### Author: ![evantill](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/evantill/32/116219_2.png) [@evantill](https://meta.discourse.org/u/evantill)
#### Post date: [December 2, 2020, 3:09pm UTC](https://meta.discourse.org/t/email-in-to-multiple-groups/169627/3 "2020-12-02T15:09:41Z")

</div>

Hi,

We have discovered the same problem here.

- Discourse version 2.6.0.beta5

How can we help to solve this bug ?

---

<div class="post-metadata">

### Author: ![Parad0x](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@Parad0x](https://meta.discourse.org/u/Parad0x)
#### Post date: [December 2, 2020, 3:23pm UTC](https://meta.discourse.org/t/email-in-to-multiple-groups/169627/4 "2020-12-02T15:23:19Z")

</div>

I’m glad not to be the only one 😉

Our Version: 2.6.0.beta6

We had no luck in solving or finding the corse of this.

---

<div class="post-metadata">

### Author: ![evantill](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/evantill/32/116219_2.png) [@evantill](https://meta.discourse.org/u/evantill)
#### Post date: [December 2, 2020, 3:48pm UTC](https://meta.discourse.org/t/email-in-to-multiple-groups/169627/5 "2020-12-02T15:48:51Z")

</div>

It seems that the mail receiver loop on the destinations and only handle the first matching destination ( if I understand well):

> <https://github.com/discourse/discourse/blob/7c95b7ceb5a9ab8ed34923f15a076b31f1a1c229/lib/email/receiver.rb#L214>
