Skip to content

BCC in email #10474

Closed

Description

@namandhakad712

🔖 Enhancement description

Hi, when sending an email to a topic, all the recipients are visible in the "to:" field. From data security point of view it should be better to add them to BCC so that other recipients not know each others email. Or am I missing a setting?

🎤 Pitch

MUST BE

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Activity

  1. added
    product / messaging
    on Sep 10, 2025
  2. SharanRP commented on Sep 29, 2025

    @SharanRP

    I dug into the code and found the problem in the messaging worker. To fix it, we can change the batching logic so that emails to topics are sent individually (one per recipient), keeping everyone's address private. For regular messages, it still batches for speed.

    $maxMessages = count($message->getAttribute('topics', [])) > 0 ? 1 : $adapter->getMaxMessagesPerRequest();
    
    $batches = \array_chunk(
        \array_keys($identifiersForProvider),
        $maxMessages
    );

    Can you assign this issue to me so I can wrap it up ? If I'm off-base here, feel free to guide me!

  3. namandhakad712 commented on Sep 29, 2025

    @namandhakad712
    Author

    I cannot assign, the repo owners could only.

  4. SharanRP commented on Oct 7, 2025

    @SharanRP

    @tessamero can I work on this issue ?

  5. ChiragAgg5k commented on Oct 8, 2025

    @ChiragAgg5k
    Member

    @SharanRP individual sending of emails can take a really long time, a better solution would be to send BCC only mails. we have actually merged this in our adapter library - utopia-php/messaging#95

    we just need to update the code to set a default recipient (you can configure this by a new env variable), and set the to field completely empty, instead opting to only bcc field

  6. SharanRP commented on Oct 8, 2025

    @SharanRP

    Got it, that makes sense.

  7. ooye-sanket commented on Dec 30, 2025

    @ooye-sanket

    Heyy all
    My PR #11042 actually implements the BCC solution discussed here for batch email sending.

    What it does:

    • Uses BCC for all recipients (maintains privacy - recipients don't see each other)
    • Only works when using the new batch API (setRecipients() method)
    • Single recipient emails still work as before

    Implementation:

    • Primary recipient is set to sender's address (required by email APIs)
    • All actual recipients are added as BCC - Recipients cannot see each other's email addresses

    Check it out: #11042 cc @ChiragAgg5k @SharanRP @namandhakad712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    product / messaging

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions