# Incoming Email - Only first recipient is handled

**URL:** https://meta.discourse.org/t/incoming-email-only-first-recipient-is-handled/203242
**Category:** Bug
**Created:** [September 11, 2021, 12:42pm UTC](https://meta.discourse.org/t/incoming-email-only-first-recipient-is-handled/203242 "2021-09-11T12:42:49Z")
**Posts on this page:** 1
**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: [September 11, 2021, 12:42pm UTC](https://meta.discourse.org/t/incoming-email-only-first-recipient-is-handled/203242/1 "2021-09-11T12:42:49Z")

</div>

An old bug has resurfaced because some users didn’t get an important info. ☹  
I noticed that the initial report is located unter support and not here under bugs.  
[@moderators](https://meta.discourse.org/groups/moderators) feel free to merge and locate everything here under bug if split/double posts are a problem. Thank you very much.

# Detailed report

> [@Email-in to multiple groups](https://meta.discourse.org/t/email-in-to-multiple-groups/169627):
>
> 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…

* * *

# Summary

An incoming email (via POP3) hat the address from multiple discourse-groups (email-enabled) in the To-Field. Only the first hit is processed. All other groups are not invited to the new topic (

* * *

@evantill found the code that handles the incoming mail:

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

I can understand some of the code, but I’m not able to make a qulity pull request.  
How can I help to get this fixed? At the moment I have to manually add all recipient groups to the automatic created message for the first recipient-group.
